Rename files in kernel/ and get rid of old ones (2.4.x kernel tree support).
+++ /dev/null
- 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
+++ /dev/null
-ifdef CONFIG_IP_NF_SET
- export-objs += ip_set.o
-endif
+++ /dev/null
-# 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
+++ /dev/null
-#!/usr/bin/perl
-
-my $expand = 0;
-
-while (<STDIN>) {
- 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
+++ /dev/null
-#!/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