Skip to content

Commit

Permalink
Fix compilation for centos 6
Browse files Browse the repository at this point in the history
`struct proto.rehash' for UDP sockets is introduced only
since 2.6.26.

Reported by ice0 and yura-mdj.

Fixes: 52e9ca4 ("Fix bind to network device.")
  • Loading branch information
aabc committed May 15, 2019
1 parent 8e375f2 commit 3e434bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ipt_NETFLOW.c
Original file line number Diff line number Diff line change
Expand Up @@ -1944,8 +1944,10 @@ static struct socket *usock_open_sock(struct ipt_netflow_sock *usock)

/* SO_BINDTOIFINDEX */
sk->sk_bound_dev_if = dev->ifindex;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
if (sk->sk_prot->rehash)
sk->sk_prot->rehash(sk);
#endif
sk_dst_reset(sk);
dev_put(dev);
} else {
Expand Down

0 comments on commit 3e434bc

Please sign in to comment.