Skip to content

Commit 779c6bd

Browse files
committed
Fix compilation for centos 6
`struct proto.rehash' for UDP sockets is introduced only since 2.6.36. Reported by ice0 and yura-mdj. Fixes: 52e9ca4 ("Fix bind to network device.")
1 parent 8e375f2 commit 779c6bd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ipt_NETFLOW.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,8 +1944,10 @@ static struct socket *usock_open_sock(struct ipt_netflow_sock *usock)
19441944

19451945
/* SO_BINDTOIFINDEX */
19461946
sk->sk_bound_dev_if = dev->ifindex;
1947+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
19471948
if (sk->sk_prot->rehash)
19481949
sk->sk_prot->rehash(sk);
1950+
#endif
19491951
sk_dst_reset(sk);
19501952
dev_put(dev);
19511953
} else {

0 commit comments

Comments
 (0)