Skip to content

Commit b8b4b2d

Browse files
committed
Compilation compatibility with linux 3.17.
1 parent 2293caf commit b8b4b2d

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

ipt_NETFLOW.c

+10-5
Original file line numberDiff line numberDiff line change
@@ -1297,9 +1297,14 @@ static int switch_promisc(int newpromisc)
12971297
#define BEFORE2632(x,y)
12981298
#endif
12991299

1300+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
1301+
#define ctl_table struct ctl_table
1302+
#endif
1303+
13001304
#ifndef CONFIG_GRKERNSEC
1301-
#define ctl_table_no_const struct ctl_table
1305+
#define ctl_table_no_const ctl_table
13021306
#endif
1307+
13031308
/* sysctl /proc/sys/net/netflow */
13041309
static int hsize_procctl(ctl_table *ctl, int write, BEFORE2632(struct file *filp,)
13051310
void __user *buffer, size_t *lenp, loff_t *fpos)
@@ -1548,7 +1553,7 @@ static struct ctl_table_header *netflow_sysctl_header;
15481553

15491554
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
15501555
#define _CTL_NAME(x) .ctl_name = x,
1551-
static void ctl_table_renumber(struct ctl_table *table)
1556+
static void ctl_table_renumber(ctl_table *table)
15521557
{
15531558
int c;
15541559

@@ -1559,7 +1564,7 @@ static void ctl_table_renumber(struct ctl_table *table)
15591564
#define _CTL_NAME(x)
15601565
#define ctl_table_renumber(x)
15611566
#endif
1562-
static struct ctl_table netflow_sysctl_table[] = {
1567+
static ctl_table netflow_sysctl_table[] = {
15631568
{
15641569
.procname = "active_timeout",
15651570
.mode = 0644,
@@ -1691,7 +1696,7 @@ static struct ctl_table netflow_sysctl_table[] = {
16911696
};
16921697

16931698
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
1694-
static struct ctl_table netflow_sysctl_root[] = {
1699+
static ctl_table netflow_sysctl_root[] = {
16951700
{
16961701
_CTL_NAME(33)
16971702
.procname = "netflow",
@@ -1701,7 +1706,7 @@ static struct ctl_table netflow_sysctl_root[] = {
17011706
{ }
17021707
};
17031708

1704-
static struct ctl_table netflow_net_table[] = {
1709+
static ctl_table netflow_net_table[] = {
17051710
{
17061711
.ctl_name = CTL_NET,
17071712
.procname = "net",

testing.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if [ "$1" = "" ]; then
66
echo Maintainer only tool.
77
exit 1
88
elif [ "$1" = all ]; then
9-
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.16
9+
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
1010
exit 1
1111
fi
1212

0 commit comments

Comments
 (0)