From: Jozsef Kadlecsik Date: Thu, 22 Apr 2010 15:00:42 +0000 (+0200) Subject: Fifth stage to ipset-5 X-Git-Tag: v5.0-pre0~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b20d409ef3062b24bbe7667f0daec34523446a6;p=thirdparty%2Fipset.git Fifth stage to ipset-5 Rename files in kernel/ and get rid of old ones (2.4.x kernel tree support). --- diff --git a/kernel/Config.in.ipset b/kernel/Config.in.ipset deleted file mode 100644 index 0f442e7d..00000000 --- a/kernel/Config.in.ipset +++ /dev/null @@ -1,18 +0,0 @@ - dep_tristate ' IP set support' CONFIG_IP_NF_SET $CONFIG_IP_NF_IPTABLES - if [ "$CONFIG_IP_NF_SET" != "n" ]; then - int ' Maximum number of sets' CONFIG_IP_NF_SET_MAX 256 - int ' Hash size for bindings of IP sets' CONFIG_IP_NF_SET_HASHSIZE 1024 - dep_tristate ' set match support' CONFIG_IP_NF_MATCH_SET $CONFIG_IP_NF_SET - dep_tristate ' SET target support' CONFIG_IP_NF_TARGET_SET $CONFIG_IP_NF_SET - dep_tristate ' ipmap set type support' CONFIG_IP_NF_SET_IPMAP $CONFIG_IP_NF_SET - dep_tristate ' macipmap set type support' CONFIG_IP_NF_SET_MACIPMAP $CONFIG_IP_NF_SET - dep_tristate ' portmap set type support' CONFIG_IP_NF_SET_PORTMAP $CONFIG_IP_NF_SET - dep_tristate ' iphash set type support' CONFIG_IP_NF_SET_IPHASH $CONFIG_IP_NF_SET - dep_tristate ' nethash set type support' CONFIG_IP_NF_SET_NETHASH $CONFIG_IP_NF_SET - dep_tristate ' ipporthash set type support' CONFIG_IP_NF_SET_IPPORTHASH $CONFIG_IP_NF_SET - dep_tristate ' ipportiphash set type support' CONFIG_IP_NF_SET_IPPORTIPHASH $CONFIG_IP_NF_SET - dep_tristate ' ipportnethash set type support' CONFIG_IP_NF_SET_IPPORTNETHASH $CONFIG_IP_NF_SET - dep_tristate ' iptree set type support' CONFIG_IP_NF_SET_IPTREE $CONFIG_IP_NF_SET - dep_tristate ' iptreemap set type support' CONFIG_IP_NF_SET_IPTREEMAP $CONFIG_IP_NF_SET - dep_tristate ' setlist set type support' CONFIG_IP_NF_SET_SETLIST $CONFIG_IP_NF_SET - fi diff --git a/kernel/Makefile.export.ipset b/kernel/Makefile.export.ipset deleted file mode 100644 index 1a971df1..00000000 --- a/kernel/Makefile.export.ipset +++ /dev/null @@ -1,3 +0,0 @@ -ifdef CONFIG_IP_NF_SET - export-objs += ip_set.o -endif diff --git a/kernel/Makefile.ipset b/kernel/Makefile.ipset deleted file mode 100644 index fe42cc10..00000000 --- a/kernel/Makefile.ipset +++ /dev/null @@ -1,17 +0,0 @@ -# ipset -obj-$(CONFIG_IP_NF_SET) += ip_set.o -obj-$(CONFIG_IP_NF_SET_IPMAP) += ip_set_ipmap.o -obj-$(CONFIG_IP_NF_SET_PORTMAP) += ip_set_portmap.o -obj-$(CONFIG_IP_NF_SET_MACIPMAP) += ip_set_macipmap.o -obj-$(CONFIG_IP_NF_SET_IPHASH) += ip_set_iphash.o -obj-$(CONFIG_IP_NF_SET_NETHASH) += ip_set_nethash.o -obj-$(CONFIG_IP_NF_SET_IPPORTHASH) += ip_set_ipporthash.o -obj-$(CONFIG_IP_NF_SET_IPPORTIPHASH) += ip_set_ipportiphash.o -obj-$(CONFIG_IP_NF_SET_IPPORTNETHASH) += ip_set_ipportnethash.o -obj-$(CONFIG_IP_NF_SET_IPTREE) += ip_set_iptree.o -obj-$(CONFIG_IP_NF_SET_IPTREEMAP) += ip_set_iptreemap.o -obj-$(CONFIG_IP_NF_SET_SETLIST) += ip_set_setlist.o - -# match and target -obj-$(CONFIG_IP_NF_MATCH_SET) += ipt_set.o -obj-$(CONFIG_IP_NF_TARGET_SET) += ipt_SET.o diff --git a/kernel/expand_macros.pl b/kernel/expand_macros.pl deleted file mode 100755 index ea0f4b6d..00000000 --- a/kernel/expand_macros.pl +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/perl - -my $expand = 0; - -while () { - if ($expand) { - print C; - } elsif (m,include \<(linux/netfilter_ipv4/ip_set\.h)\>,) { - $expand = 1; - open(C, "|gcc -D__KERNEL__ -Iinclude -E - 2>/dev/null| indent -kr -i8") || die "Can't run gcc: $!\n"; - print C; - } else { - print; - } -} -close C; - \ No newline at end of file diff --git a/kernel/include/linux/netfilter_ipv4/ip_set.h b/kernel/include/linux/netfilter/ip_set.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set.h rename to kernel/include/linux/netfilter/ip_set.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_bitmaps.h b/kernel/include/linux/netfilter/ip_set_bitmaps.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_bitmaps.h rename to kernel/include/linux/netfilter/ip_set_bitmaps.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_compat.h b/kernel/include/linux/netfilter/ip_set_compat.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_compat.h rename to kernel/include/linux/netfilter/ip_set_compat.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_getport.h b/kernel/include/linux/netfilter/ip_set_getport.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_getport.h rename to kernel/include/linux/netfilter/ip_set_getport.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_hashes.h b/kernel/include/linux/netfilter/ip_set_hashes.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_hashes.h rename to kernel/include/linux/netfilter/ip_set_hashes.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_iphash.h b/kernel/include/linux/netfilter/ip_set_iphash.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_iphash.h rename to kernel/include/linux/netfilter/ip_set_iphash.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_ipmap.h b/kernel/include/linux/netfilter/ip_set_ipmap.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_ipmap.h rename to kernel/include/linux/netfilter/ip_set_ipmap.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_ipporthash.h b/kernel/include/linux/netfilter/ip_set_ipporthash.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_ipporthash.h rename to kernel/include/linux/netfilter/ip_set_ipporthash.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_ipportiphash.h b/kernel/include/linux/netfilter/ip_set_ipportiphash.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_ipportiphash.h rename to kernel/include/linux/netfilter/ip_set_ipportiphash.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_ipportnethash.h b/kernel/include/linux/netfilter/ip_set_ipportnethash.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_ipportnethash.h rename to kernel/include/linux/netfilter/ip_set_ipportnethash.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_iptree.h b/kernel/include/linux/netfilter/ip_set_iptree.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_iptree.h rename to kernel/include/linux/netfilter/ip_set_iptree.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_iptreemap.h b/kernel/include/linux/netfilter/ip_set_iptreemap.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_iptreemap.h rename to kernel/include/linux/netfilter/ip_set_iptreemap.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_jhash.h b/kernel/include/linux/netfilter/ip_set_jhash.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_jhash.h rename to kernel/include/linux/netfilter/ip_set_jhash.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_macipmap.h b/kernel/include/linux/netfilter/ip_set_macipmap.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_macipmap.h rename to kernel/include/linux/netfilter/ip_set_macipmap.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_malloc.h b/kernel/include/linux/netfilter/ip_set_malloc.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_malloc.h rename to kernel/include/linux/netfilter/ip_set_malloc.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_nethash.h b/kernel/include/linux/netfilter/ip_set_nethash.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_nethash.h rename to kernel/include/linux/netfilter/ip_set_nethash.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_portmap.h b/kernel/include/linux/netfilter/ip_set_portmap.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_portmap.h rename to kernel/include/linux/netfilter/ip_set_portmap.h diff --git a/kernel/include/linux/netfilter_ipv4/ip_set_setlist.h b/kernel/include/linux/netfilter/ip_set_setlist.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ip_set_setlist.h rename to kernel/include/linux/netfilter/ip_set_setlist.h diff --git a/kernel/include/linux/netfilter_ipv4/ipt_set.h b/kernel/include/linux/netfilter/ipt_set.h similarity index 100% rename from kernel/include/linux/netfilter_ipv4/ipt_set.h rename to kernel/include/linux/netfilter/ipt_set.h diff --git a/kernel/ip_set_ipmap.c b/kernel/ip_set_bitmap_ip.c similarity index 100% rename from kernel/ip_set_ipmap.c rename to kernel/ip_set_bitmap_ip.c diff --git a/kernel/ip_set_macipmap.c b/kernel/ip_set_bitmap_ipmac.c similarity index 100% rename from kernel/ip_set_macipmap.c rename to kernel/ip_set_bitmap_ipmac.c diff --git a/kernel/ip_set_portmap.c b/kernel/ip_set_bitmap_port.c similarity index 100% rename from kernel/ip_set_portmap.c rename to kernel/ip_set_bitmap_port.c diff --git a/kernel/ip_set_iphash.c b/kernel/ip_set_hash_ip.c similarity index 100% rename from kernel/ip_set_iphash.c rename to kernel/ip_set_hash_ip.c diff --git a/kernel/ip_set_ipporthash.c b/kernel/ip_set_hash_ipport.c similarity index 100% rename from kernel/ip_set_ipporthash.c rename to kernel/ip_set_hash_ipport.c diff --git a/kernel/ip_set_ipportiphash.c b/kernel/ip_set_hash_ipportip.c similarity index 100% rename from kernel/ip_set_ipportiphash.c rename to kernel/ip_set_hash_ipportip.c diff --git a/kernel/ip_set_ipportnethash.c b/kernel/ip_set_hash_ipportnet.c similarity index 100% rename from kernel/ip_set_ipportnethash.c rename to kernel/ip_set_hash_ipportnet.c diff --git a/kernel/ip_set_nethash.c b/kernel/ip_set_hash_net.c similarity index 100% rename from kernel/ip_set_nethash.c rename to kernel/ip_set_hash_net.c diff --git a/kernel/ip_set_setlist.c b/kernel/ip_set_list_set.c similarity index 100% rename from kernel/ip_set_setlist.c rename to kernel/ip_set_list_set.c diff --git a/kernel/ip_set_iptree.c b/kernel/ip_set_tree_ip.c similarity index 100% rename from kernel/ip_set_iptree.c rename to kernel/ip_set_tree_ip.c diff --git a/kernel/patch_kernel b/kernel/patch_kernel deleted file mode 100755 index a3f96f0b..00000000 --- a/kernel/patch_kernel +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -# set -e - -kconfig() { - file=$1/net/ipv4/netfilter/Kconfig - if [ "`grep 'config IP_NF_SET' $file`" ]; then - return - fi - mv $file $file.orig - grep -v endmenu $file.orig > $file - cat Kconfig.ipset >> $file - echo "endmenu" >> $file -} - -config() { - file=$1/net/ipv4/netfilter/Config.in - if [ "`grep 'CONFIG_IP_NF_SET' $file`" ]; then - return - fi - mv $file $file.orig - grep -v endmenu $file.orig > $file - cat Config.in.ipset >> $file - echo "endmenu" >> $file -} - -makefile() { - file=$1/net/ipv4/netfilter/Makefile - if [ "`grep CONFIG_IP_NF_SET $file`" ]; then - return - fi - cp $file $file.orig - cat Makefile.ipset >> $file -} - -oldmakefile() { - file=$1/net/ipv4/netfilter/Makefile - if [ "`grep CONFIG_IP_NF_SET $file`" ]; then - return - fi - lineno=`grep -n Rules.make $file | cut -f1 -d:` - lineno=$((lineno-1)) - head -n $lineno $file > $file.head - lineno=$((lineno+1)) - tail +$lineno $file > $file.tail - cp $file $file.orig - cat $file.head Makefile.ipset Makefile.export.ipset $file.tail > $file -} - -tree() { - cp include/linux/netfilter_ipv4/* $1/include/linux/netfilter_ipv4/ - cp *.c $1/net/ipv4/netfilter/ -} - -if [ -z "$1" ]; then - echo "Error: missing kernel directory parameter." - exit 1 -fi -if [ -f $1/net/ipv4/netfilter/Kconfig ]; then - tree $1 - kconfig $1 - makefile $1 -elif [ -f $1/net/ipv4/netfilter/Config.in ]; then - tree $1 - config $1 - oldmakefile $1 -else - echo "Error: The directory $1 doesn't look like a Linux 2.4/2.6 kernel source tree." - exit 1 -fi