From 3e434bcebc3c3f7ffcf1469f30855c65370cad72 Mon Sep 17 00:00:00 2001
From: ABC <abc@openwall.com>
Date: Wed, 15 May 2019 23:05:27 +0300
Subject: [PATCH] Fix compilation for centos 6

`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.")
---
 ipt_NETFLOW.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
index 5e12a72..69751aa 100644
--- a/ipt_NETFLOW.c
+++ b/ipt_NETFLOW.c
@@ -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 {