patch-2.1.18 linux/net/core/firewall.c

Next file: linux/net/ipv4/ip_masq.c
Previous file: linux/net/ax25/af_ax25.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.17/linux/net/core/firewall.c linux/net/core/firewall.c
@@ -6,7 +6,7 @@
  *	much hacked by:	Alan Cox
  */
 
-#include <linux/module.h> 
+#include <linux/module.h>
 #include <linux/skbuff.h>
 #include <linux/firewall.h>
 
@@ -17,24 +17,24 @@
 /*
  *	Register a firewall
  */
- 
+
 int register_firewall(int pf, struct firewall_ops *fw)
 {
 	struct firewall_ops **p;
-	
+
 	if(pf<0||pf>=NPROTO)
 		return -EINVAL;
-	
+
 	/*
 	 *	Don't allow two people to adjust at once.
 	 */
-	 
+
 	while(firewall_lock)
 		schedule();
 	firewall_lock=1;
-	
+
 	p=&firewall_chain[pf];
-	
+
 	while(*p)
 	{
 		if(fw->fw_priority > (*p)->fw_priority)
@@ -42,7 +42,7 @@
 		p=&((*p)->next);
 	}
 
-	
+
 	/*
 	 * We need to use a memory barrier to make sure that this
 	 * works correctly even in SMP with weakly ordered writes.
@@ -70,20 +70,20 @@
 int unregister_firewall(int pf, struct firewall_ops *fw)
 {
 	struct firewall_ops **nl;
-	
+
 	if(pf<0||pf>=NPROTO)
 		return -EINVAL;
-	
+
 	/*
 	 *	Don't allow two people to adjust at once.
 	 */
-	 
+
 	while(firewall_lock)
 		schedule();
 	firewall_lock=1;
 
 	nl=&firewall_chain[pf];
-	
+
 	while(*nl!=NULL)
 	{
 		if(*nl==fw)
@@ -92,7 +92,7 @@
 			*nl = f;
 			firewall_lock=0;
 			return 0;
-		}			
+		}
 		nl=&((*nl)->next);
 	}
 	firewall_lock=0;
@@ -102,7 +102,7 @@
 int call_fw_firewall(int pf, struct device *dev, void *phdr, void *arg)
 {
 	struct firewall_ops *fw=firewall_chain[pf];
-	
+
 	while(fw!=NULL)
 	{
 		int rc=fw->fw_forward(fw,pf,dev,phdr,arg);
@@ -116,11 +116,11 @@
 /*
  *	Actual invocation of the chains
  */
- 
+
 int call_in_firewall(int pf, struct device *dev, void *phdr, void *arg)
 {
 	struct firewall_ops *fw=firewall_chain[pf];
-	
+
 	while(fw!=NULL)
 	{
 		int rc=fw->fw_input(fw,pf,dev,phdr,arg);
@@ -134,7 +134,7 @@
 int call_out_firewall(int pf, struct device *dev, void *phdr, void *arg)
 {
 	struct firewall_ops *fw=firewall_chain[pf];
-	
+
 	while(fw!=NULL)
 	{
 		int rc=fw->fw_output(fw,pf,dev,phdr,arg);
@@ -146,20 +146,15 @@
 	return firewall_policy[pf];
 }
 
-static struct symbol_table firewall_syms = {
-#include <linux/symtab_begin.h>
-	X(register_firewall),
-	X(unregister_firewall),
-	X(call_in_firewall),
-	X(call_out_firewall),
-	X(call_fw_firewall),
-#include <linux/symtab_end.h>
-};
+EXPORT_SYMBOL(register_firewall);
+EXPORT_SYMBOL(unregister_firewall);
+EXPORT_SYMBOL(call_in_firewall);
+EXPORT_SYMBOL(call_out_firewall);
+EXPORT_SYMBOL(call_fw_firewall);
 
 void fwchain_init(void)
 {
 	int i;
 	for(i=0;i<NPROTO;i++)
 		firewall_policy[i]=FW_ACCEPT;
-	register_symtab(&firewall_syms);
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov