Messages in this thread Patch in this message | | | From | Rusty Russell <> | Subject | Re: PROBLEM: 2.3.49 and 0.1.18 comp-fail | Date | Wed, 08 Mar 2000 17:28:10 +1100 |
| |
In message <200003030159.TAA07212@kanhere.net> you write: > > hi. > > I use netfilter with 2.3.x. kernels. Last kernel 2.3.49 does not compile > with netfilter 0.1.18...
We're part-way through the merge. Expect some brokenness for the next few kernels.
If you really want a quick fix, remove the Makefile in the device subdirectory, and then apply the following patch which removes the initializer for the `flush' strategy (courtesy of JamesM):
diff -urN --exclude=*.[oad] --exclude=*.so --exclude=HOWTO* netfilter-0.90.4.orig/NAT/ip_nat_standalone.c netfilter-0.90.4-jm/NAT/ip_nat_standalone.c --- netfilter-0.90.4.orig/NAT/ip_nat_standalone.c Thu Feb 24 01:35:17 2000 +++ netfilter-0.90.4-jm/NAT/ip_nat_standalone.c Sat Mar 4 14:33:26 2000 @@ -222,13 +222,13 @@ /* Before packet filtering, change destination */ static struct nf_hook_ops ip_nat_in_ops -= { { NULL, NULL }, ip_nat_fn, NULL, PF_INET, NF_IP_PRE_ROUTING, -100 }; += { { NULL, NULL }, ip_nat_fn, PF_INET, NF_IP_PRE_ROUTING, -100 }; /* After packet filtering, change source */ static struct nf_hook_ops ip_nat_out_ops -= { { NULL, NULL }, ip_nat_out, NULL, PF_INET, NF_IP_POST_ROUTING, 100 }; += { { NULL, NULL }, ip_nat_out, PF_INET, NF_IP_POST_ROUTING, 100 }; /* Before packet filtering, change destination */ static struct nf_hook_ops ip_nat_local_out_ops -= { { NULL, NULL }, ip_nat_fn, NULL, PF_INET, NF_IP_LOCAL_OUT, -100 }; += { { NULL, NULL }, ip_nat_fn, PF_INET, NF_IP_LOCAL_OUT, -100 }; /* Protocol registration. */ int ip_nat_protocol_register(struct ip_nat_protocol *proto) diff -urN --exclude=*.[oad] --exclude=*.so --exclude=HOWTO* netfilter-0.90.4.orig/compat/ip_fw_compat.c netfilter-0.90.4-jm/compat/ip_fw_compat.c --- netfilter-0.90.4.orig/compat/ip_fw_compat.c Sun Dec 12 17:24:46 1999 +++ netfilter-0.90.4-jm/compat/ip_fw_compat.c Sat Mar 4 14:33:26 2000 @@ -174,13 +174,13 @@ } static struct nf_hook_ops preroute_ops -= { { NULL, NULL }, fw_in, NULL, PF_INET, NF_IP_PRE_ROUTING, 0 }; += { { NULL, NULL }, fw_in, PF_INET, NF_IP_PRE_ROUTING, 0 }; static struct nf_hook_ops postroute_ops -= { { NULL, NULL }, fw_in, NULL, PF_INET, NF_IP_POST_ROUTING, 0 }; += { { NULL, NULL }, fw_in, PF_INET, NF_IP_POST_ROUTING, 0 }; static struct nf_hook_ops forward_ops -= { { NULL, NULL }, fw_in, NULL, PF_INET, NF_IP_FORWARD, 0 }; += { { NULL, NULL }, fw_in, PF_INET, NF_IP_FORWARD, 0 }; static struct nf_sockopt_ops sock_ops = { { NULL, NULL }, PF_INET, 64, 64 + 1024 + 1, &sock_fn, 0, 0, NULL }; diff -urN --exclude=*.[oad] --exclude=*.so --exclude=HOWTO* netfilter-0.90.4.orig/conntrack/ip_conntrack_standalone.c netfilter-0.90.4-jm/conntrack/ip_conntrack_standalone.c --- netfilter-0.90.4.orig/conntrack/ip_conntrack_standalone.c Thu Feb 24 01:35:22 2000 +++ netfilter-0.90.4-jm/conntrack/ip_conntrack_standalone.c Sat Mar 4 14:33:26 2000 @@ -187,12 +187,12 @@ /* Connection tracking may drop packets, but never alters them, so make it the first hook. */ static struct nf_hook_ops ip_conntrack_in_ops -= { { NULL, NULL }, ip_conntrack_in, NULL, PF_INET, NF_IP_PRE_ROUTING, -200 }; += { { NULL, NULL }, ip_conntrack_in, PF_INET, NF_IP_PRE_ROUTING, -200 }; static struct nf_hook_ops ip_conntrack_local_out_ops -= { { NULL, NULL }, ip_conntrack_in, NULL, PF_INET, NF_IP_LOCAL_OUT, -200 }; += { { NULL, NULL }, ip_conntrack_in, PF_INET, NF_IP_LOCAL_OUT, -200 }; /* Refragmenter; last chance. */ static struct nf_hook_ops ip_conntrack_out_ops -= { { NULL, NULL }, ip_refrag, NULL, PF_INET, NF_IP_POST_ROUTING, INT_MAX }; += { { NULL, NULL }, ip_refrag, PF_INET, NF_IP_POST_ROUTING, INT_MAX }; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,25) #ifdef CONFIG_PROC_FS diff -urN --exclude=*.[oad] --exclude=*.so --exclude=HOWTO* netfilter-0.90.4.orig/filter/ipt_filter.c netfilter-0.90.4-jm/filter/ipt_filter.c --- netfilter-0.90.4.orig/filter/ipt_filter.c Sat Feb 19 14:52:41 2000 +++ netfilter-0.90.4-jm/filter/ipt_filter.c Sat Mar 4 14:33:26 2000 @@ -116,9 +116,9 @@ } static struct nf_hook_ops ipt_ops[] -= { { { NULL, NULL }, ipt_hook, NULL, PF_INET, NF_IP_LOCAL_IN, 0 }, - { { NULL, NULL }, ipt_hook, NULL, PF_INET, NF_IP_FORWARD, 0 }, - { { NULL, NULL }, ipt_local_out_hook, NULL, PF_INET, NF_IP_LOCAL_OUT, 0 } += { { { NULL, NULL }, ipt_hook, PF_INET, NF_IP_LOCAL_IN, 0 }, + { { NULL, NULL }, ipt_hook, PF_INET, NF_IP_FORWARD, 0 }, + { { NULL, NULL }, ipt_local_out_hook, PF_INET, NF_IP_LOCAL_OUT, 0 } }; /* Default to no forward for security reasons. */ diff -urN --exclude=*.[oad] --exclude=*.so --exclude=HOWTO* netfilter-0.90.4.orig/forward-fragment/forward-fragment.c netfilter-0.90.4-jm/forward-fragment/forward-fragment.c --- netfilter-0.90.4.orig/forward-fragment/forward-fragment.c Sun Dec 12 17:33:21 1999 +++ netfilter-0.90.4-jm/forward-fragment/forward-fragment.c Sat Mar 4 14:33:26 2000 @@ -31,7 +31,7 @@ } static struct nf_hook_ops forward_frag_ops -= { { NULL, NULL }, forward_frag_hook, NULL, PF_INET, NF_IP_LOCAL_OUT, INT_MAX }; += { { NULL, NULL }, forward_frag_hook, PF_INET, NF_IP_LOCAL_OUT, INT_MAX }; int init_module(void) { diff -urN --exclude=*.[oad] --exclude=*.so --exclude=HOWTO* netfilter-0.90.4.orig/tools/drop_invalid.c netfilter-0.90.4-jm/tools/drop_invalid.c --- netfilter-0.90.4.orig/tools/drop_invalid.c Sun Dec 12 17:26:33 1999 +++ netfilter-0.90.4-jm/tools/drop_invalid.c Sat Mar 4 14:33:27 2000 @@ -30,7 +30,7 @@ } static struct nf_hook_ops dropinvalid_ops -= { { NULL, NULL }, invalid_hook, NULL, PF_INET, 0, 0 }; += { { NULL, NULL }, invalid_hook, PF_INET, 0, 0 }; int init_module(void) { diff -urN --exclude=*.[oad] --exclude=*.so --exclude=HOWTO* netfilter-0.90.4.orig/tools/gen_ip.c netfilter-0.90.4-jm/tools/gen_ip.c --- netfilter-0.90.4.orig/tools/gen_ip.c Thu Feb 24 01:35:29 2000 +++ netfilter-0.90.4-jm/tools/gen_ip.c Sat Mar 4 14:33:27 2000 @@ -17,6 +17,7 @@ #include <linux/if_ether.h> #endif #include <sys/types.h> +#include <limits.h> static u_int16_t csum_partial(void *buffer, unsigned int len, u_int16_t prevsum) diff -urN --exclude=*.[oad] --exclude=*.so --exclude=HOWTO* netfilter-0.90.4.orig/tools/redirect.c netfilter-0.90.4-jm/tools/redirect.c --- netfilter-0.90.4.orig/tools/redirect.c Sun Dec 12 17:25:10 1999 +++ netfilter-0.90.4-jm/tools/redirect.c Sat Mar 4 14:33:27 2000 @@ -20,7 +20,7 @@ } static struct nf_hook_ops redir_ops -= { { NULL, NULL }, redirect_hook, NULL, PF_INET, 0, 0 }; += { { NULL, NULL }, redirect_hook, PF_INET, 0, 0 }; int init_module(void) { -- Hacking time. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |