pinkbyte 15/07/08 10:35:54 Added: ipt_netflow-2.1-linux-3.19.patch Log: Fix building with kernel 3.19, wrt bug #552476. Thanks to Tomasz Chilinski <tomasz.chilinski AT chilan.com> for discovering this issue (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0x60C0742D1F357D42)
Revision Changes Path 1.1 net-firewall/ipt_netflow/files/ipt_netflow-2.1-linux-3.19.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/ipt_netflow/files/ipt_netflow-2.1-linux-3.19.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/ipt_netflow/files/ipt_netflow-2.1-linux-3.19.patch?rev=1.1&content-type=text/plain Index: ipt_netflow-2.1-linux-3.19.patch =================================================================== commit 582fd497a5f0f5ae5dce24cba042d856d63bfbe1 Author: ABC <[email protected]> Date: Mon Feb 16 21:53:54 2015 +0400 Compatibility of __get_cpu_var with linux 3.19. Fixes #28, thanks boyarsh@github. diff --git a/ipt_NETFLOW.h b/ipt_NETFLOW.h index bc2734f..5548e57 100644 --- a/ipt_NETFLOW.h +++ b/ipt_NETFLOW.h @@ -396,6 +396,9 @@ struct netflow_aggr_p { __u16 aggr_port; }; +#ifndef __get_cpu_var +#define __get_cpu_var(var) (*this_cpu_ptr(&(var))) +#endif #define NETFLOW_STAT_INC(count) (__get_cpu_var(ipt_netflow_stat).count++) #define NETFLOW_STAT_ADD(count, val) (__get_cpu_var(ipt_netflow_stat).count += (unsigned long long)val) #define NETFLOW_STAT_SET(count, val) (__get_cpu_var(ipt_netflow_stat).count = (unsigned long long)val) diff --git a/testing.sh b/testing.sh index b465c8d..caa4f03 100755 --- a/testing.sh +++ b/testing.sh @@ -6,7 +6,7 @@ if [ "$1" = "" ]; then echo Maintainer only tool. exit 1 elif [ "$1" = all ]; then - exec bash $0 linux-2.6.18 centos5 linux-3.11.2 centos6 linux-3.4.66 linux-3.9.11 centos7 linux-3.14 linux-3.17 + exec bash $0 linux-2.6.18 centos5 linux-3.11.2 centos6 linux-3.4.66 linux-3.9.11 centos7 linux-3.14 linux-3.17 linux-3.19 exit 1 fi @@ -33,6 +33,9 @@ readarray -t opts <<EOF --enable-sampler=hash --enable-promisc EOF +if [ "$SHORT" ]; then + opts=("") +fi colorecho() { echo -e "\033[1;32m$@\033[m"
