Skip Menu |

This queue is for tickets about the IPTables-IPv4 CPAN distribution.

Report information
The Basics
Id: 30395
Status: open
Priority: 0/
Queue: IPTables-IPv4

People
Owner: Nobody in particular
Requestors: gburger [...] cs.up.ac.za
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Module doesn't compile on kernel 2.6.22
Date: Wed, 31 Oct 2007 23:27:22 +0200
To: bug-IPTables-IPv4 [...] rt.cpan.org
From: Gert Burger <gburger [...] cs.up.ac.za>
Module requires linux/netfilter_ipv4/ip_nat.h which was removed from linux kernel in 2.6.22 and therefore cannot compile. -- Gert Burger TechTeam Computer Science Department University of Pretoria
Following patch works for me on debian unstable (2.6.26-2-686) (see attached)
diff -rupN IPTables-IPv4-0.98.orig/Makefile.PL IPTables-IPv4-0.98.new/Makefile.PL --- IPTables-IPv4-0.98.orig/Makefile.PL 2009-05-26 15:31:06.000000000 +0100 +++ IPTables-IPv4-0.98.new/Makefile.PL 2009-05-26 15:33:27.000000000 +0100 @@ -80,7 +80,7 @@ WriteMakefile( 'VERSION_FROM' => 'IPv4.pm', # finds $VERSION 'OBJECT' => 'IPv4.o loader.o packer.o unpacker.o maskgen.o libiptc/libiptc.a', 'INC' => '-Iinclude -I/usr/src/linux/include', - 'CCFLAGS' => "-Wall -DMODULE_PATH=\\\"$moduledir\\\"" . (defined $Config{'use64bitint'} ? " -DPERL_USES_64BIT_INT" : ""), + 'CCFLAGS' => "-Wall -Dip_nat_range=nf_nat_range -Dip_nat_multi_range=nf_nat_multi_range -DMODULE_PATH=\\\"$moduledir\\\"" . (defined $Config{'use64bitint'} ? " -DPERL_USES_64BIT_INT" : ""), 'TYPEMAPS' => ['IPTables.typemap'], 'XSPROTOARG' => '-noprototypes', ); diff -rupN IPTables-IPv4-0.98.orig/modules/ipt_pl_DNAT.c IPTables-IPv4-0.98.new/modules/ipt_pl_DNAT.c --- IPTables-IPv4-0.98.orig/modules/ipt_pl_DNAT.c 2009-05-26 15:31:06.000000000 +0100 +++ IPTables-IPv4-0.98.new/modules/ipt_pl_DNAT.c 2009-05-26 15:33:27.000000000 +0100 @@ -8,7 +8,7 @@ #include <stdio.h> #include <stdlib.h> #include <linux/netfilter_ipv4/ip_tables.h> -#include <linux/netfilter_ipv4/ip_nat.h> +#include <net/netfilter/nf_nat.h> #include <limits.h> #include <netinet/in.h> diff -rupN IPTables-IPv4-0.98.orig/modules/ipt_pl_iplimit.c IPTables-IPv4-0.98.new/modules/ipt_pl_iplimit.c --- IPTables-IPv4-0.98.orig/modules/ipt_pl_iplimit.c 2009-05-26 15:31:06.000000000 +0100 +++ IPTables-IPv4-0.98.new/modules/ipt_pl_iplimit.c 2009-05-26 15:37:01.000000000 +0100 @@ -6,7 +6,7 @@ #include "../module_iface.h" #include <string.h> #include <stdio.h> -#include <linux/netfilter_ipv4/ip_conntrack.h> +#include <net/netfilter/nf_conntrack.h> #include <linux/netfilter_ipv4/ipt_iplimit.h> #include <netinet/in.h> diff -rupN IPTables-IPv4-0.98.orig/modules/ipt_pl_MASQUERADE.c IPTables-IPv4-0.98.new/modules/ipt_pl_MASQUERADE.c --- IPTables-IPv4-0.98.orig/modules/ipt_pl_MASQUERADE.c 2009-05-26 15:31:06.000000000 +0100 +++ IPTables-IPv4-0.98.new/modules/ipt_pl_MASQUERADE.c 2009-05-26 15:33:27.000000000 +0100 @@ -8,7 +8,7 @@ #include <stdio.h> #include <stdlib.h> #include <linux/netfilter_ipv4/ip_tables.h> -#include <linux/netfilter_ipv4/ip_nat.h> +#include <net/netfilter/nf_nat.h> #include <netinet/in.h> static void setup(void *myinfo, unsigned int *nfcache) { diff -rupN IPTables-IPv4-0.98.orig/modules/ipt_pl_REDIRECT.c IPTables-IPv4-0.98.new/modules/ipt_pl_REDIRECT.c --- IPTables-IPv4-0.98.orig/modules/ipt_pl_REDIRECT.c 2009-05-26 15:31:06.000000000 +0100 +++ IPTables-IPv4-0.98.new/modules/ipt_pl_REDIRECT.c 2009-05-26 15:33:27.000000000 +0100 @@ -8,7 +8,7 @@ #include <stdio.h> #include <stdlib.h> #include <linux/netfilter_ipv4/ip_tables.h> -#include <linux/netfilter_ipv4/ip_nat.h> +#include <net/netfilter/nf_nat.h> #include <netinet/in.h> static void setup(void *myinfo, unsigned int *nfcache) { diff -rupN IPTables-IPv4-0.98.orig/modules/ipt_pl_SNAT.c IPTables-IPv4-0.98.new/modules/ipt_pl_SNAT.c --- IPTables-IPv4-0.98.orig/modules/ipt_pl_SNAT.c 2009-05-26 15:31:06.000000000 +0100 +++ IPTables-IPv4-0.98.new/modules/ipt_pl_SNAT.c 2009-05-26 15:33:27.000000000 +0100 @@ -8,7 +8,7 @@ #include <stdio.h> #include <stdlib.h> #include <linux/netfilter_ipv4/ip_tables.h> -#include <linux/netfilter_ipv4/ip_nat.h> +#include <net/netfilter/nf_nat.h> #include <netinet/in.h> #include <limits.h> diff -rupN IPTables-IPv4-0.98.orig/modules/ipt_pl_state.c IPTables-IPv4-0.98.new/modules/ipt_pl_state.c --- IPTables-IPv4-0.98.orig/modules/ipt_pl_state.c 2009-05-26 15:31:06.000000000 +0100 +++ IPTables-IPv4-0.98.new/modules/ipt_pl_state.c 2009-05-26 15:37:20.000000000 +0100 @@ -7,7 +7,7 @@ #include <string.h> #include <stdio.h> #include <linux/netfilter_ipv4/ipt_state.h> -#include <linux/netfilter_ipv4/ip_conntrack.h> +#include <net/netfilter/nf_conntrack.h> static void setup(void *myinfo, unsigned int *nfcache) { *nfcache |= NFC_UNKNOWN; diff -rupN IPTables-IPv4-0.98.orig/modules/Makefile IPTables-IPv4-0.98.new/modules/Makefile --- IPTables-IPv4-0.98.orig/modules/Makefile 2009-05-26 15:31:06.000000000 +0100 +++ IPTables-IPv4-0.98.new/modules/Makefile 2009-05-26 15:36:33.000000000 +0100 @@ -16,7 +16,7 @@ ifndef INSTALL_DIR INSTALL_DIR := $(INSTALL_BASE)/lib/IPTables-IPv4 endif -CFLAGS := -I$(KERNEL_INC) -I$(NF_INC) -I$(PERL_INC) -I.. -Wall -O2 -Wundef +CFLAGS := -I$(KERNEL_INC) -I$(NF_INC) -I$(PERL_INC) -I.. -Wall -O2 -Wundef -Dip_nat_range=nf_nat_range -Dip_nat_multi_range=nf_nat_multi_range # Basic protocol modules for IPTables::IPv4 MODULE_NAMES := icmp tcp udp ah esp