diff options
Diffstat (limited to 'testing/ipt-netflow/kernel-vs-userspace.patch')
-rw-r--r-- | testing/ipt-netflow/kernel-vs-userspace.patch | 85 |
1 files changed, 49 insertions, 36 deletions
diff --git a/testing/ipt-netflow/kernel-vs-userspace.patch b/testing/ipt-netflow/kernel-vs-userspace.patch index 8f9857fa8b..ce551e5bd3 100644 --- a/testing/ipt-netflow/kernel-vs-userspace.patch +++ b/testing/ipt-netflow/kernel-vs-userspace.patch @@ -1,18 +1,31 @@ -diff --git a/configure b/configure -index 3f10e2a..b43f024 100755 ---- a/configure -+++ b/configure -@@ -256,6 +256,8 @@ do - --ipt-inc=*) IPTINC="$ac_optarg" ;; - --kver=*) KVERSION="$ac_optarg" ;; - --kdir=*) KDIR="$ac_optarg" ;; -+ --disable-kernel) NOKERNEL=1;; -+ --disable-ipt) NOIPT=1;; +--- ipt-netflow-2.0.orig/configure ++++ ipt-netflow-2.0/configure +@@ -258,9 +258,13 @@ + echo " --enable-vlan enables VLAN Ids for v9/IPFIX" + echo " --enable-direction enables flowDirection(61) Element" + echo " --disable-aggregation disables aggregation rules" ++ echo " --disable-kernel disable kernel module" ++ echo " --disable-ipt disable ipt" + exit 0 + } + ++BUILD_MODULE=true ++BUILD_IPT=true + CARGS="$@" + for ac_option + do +@@ -284,7 +288,8 @@ + --enable-mac*) KOPTS="$KOPTS -DENABLE_MAC" ;; + --enable-vlan*) KOPTS="$KOPTS -DENABLE_VLAN" ;; + --enable-direc*) KOPTS="$KOPTS -DENABLE_DIRECTION" ;; +- --disable-aggr*) KOPTS="$KOPTS -DDISABLE_AGGR" ;; ++ --disable-kernel) BUILD_MODULE=false ;; ++ --disable-ipt) BUILD_IPT=false ;; --make) echo called from make ;; - --help) show_help ;; - -*) echo Invalid option: $ac_option; exit 1 ;; -@@ -353,22 +355,26 @@ kernel_check_config() { - kconfig CONFIG_IP6_NF_IPTABLES "ip6tables target" + -Werror) KOPTS="$KOPTS -Werror" ;; + --help|-h) show_help ;; +@@ -407,23 +412,27 @@ + kernel_check_include include/linux/llist.h -DHAVE_LLIST } -kernel_find_version #KVERSION @@ -22,35 +35,35 @@ index 3f10e2a..b43f024 100755 -echo "Kernel sources: $KDIR ($KSHOW)" -kernel_check_consistency -kernel_check_config -- +-kernel_check_features ++if $BUILD_MODULE; then ++ kernel_find_version #KVERSION ++ test "$KLIBMOD" || KLIBMOD=$KVERSION ++ echo "Kernel version: $KVERSION ($KHOW)" ++ kernel_find_source #KDIR ++ echo "Kernel sources: $KDIR ($KSHOW)" ++ kernel_check_consistency ++ kernel_check_config ++ kernel_check_features ++fi + -test "$IPTBIN" || IPTBIN=`which iptables` -- ++if $BUILD_IPT; then ++ test "$IPTBIN" || IPTBIN=`which iptables` + -iptables_find_version #IPTVER -iptables_try_pkgconfig #try to configure from pkg-config -iptables_find_src #IPTSRC -iptables_src_version #check that IPTSRC match to IPTVER -iptables_inc #IPTINC -iptables_modules #IPTLIB -+if ! test "$NOKERNEL"; then -+ kernel_find_version #KVERSION -+ test "$KLIBMOD" || KLIBMOD=$KVERSION -+ echo "Kernel version: $KVERSION ($KHOW)" -+ kernel_find_source #KDIR -+ echo "Kernel sources: $KDIR ($KSHOW)" -+ kernel_check_consistency -+ kernel_check_config -+fi -+ -+if ! test "$NOIPT"; then -+ test "$IPTBIN" || IPTBIN=`which iptables` -+ -+ iptables_find_version #IPTVER -+ iptables_try_pkgconfig #try to configure from pkg-config -+ iptables_find_src #IPTSRC -+ iptables_src_version #check that IPTSRC match to IPTVER -+ iptables_inc #IPTINC -+ iptables_modules #IPTLIB ++ iptables_find_version #IPTVER ++ iptables_try_pkgconfig #try to configure from pkg-config ++ iptables_find_src #IPTSRC ++ iptables_src_version #check that IPTSRC match to IPTVER ++ iptables_inc #IPTINC ++ iptables_modules #IPTLIB +fi REPLACE="\ - s!@KVERSION@!$KVERSION!;\ + s!@CARGS@!$CARGS!;\ |