aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chion Tang <tech@chionlab.moe> 2018-09-03 11:19:40 +0800
committerGravatar Chion Tang <tech@chionlab.moe> 2018-09-03 11:19:40 +0800
commitbc3fb32f3ff8facebad65dfbd12a64bf9b9276f4 (patch)
tree56647e380c4fbde9196e66b5fa1c2e7e16e4909c
parentCreate LICENSE (diff)
downloadnetfilter-full-cone-nat-bc3fb32f3ff8facebad65dfbd12a64bf9b9276f4.tar.gz
netfilter-full-cone-nat-bc3fb32f3ff8facebad65dfbd12a64bf9b9276f4.tar.bz2
netfilter-full-cone-nat-bc3fb32f3ff8facebad65dfbd12a64bf9b9276f4.zip
refactor: support for 4.18.x
-rw-r--r--xt_FULLCONENAT.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xt_FULLCONENAT.c b/xt_FULLCONENAT.c
index 67badc1..9e52eba 100644
--- a/xt_FULLCONENAT.c
+++ b/xt_FULLCONENAT.c
@@ -472,7 +472,11 @@ static unsigned int fullconenat_tg(struct sk_buff *skb, const struct xt_action_p
struct nat_mapping *mapping, *src_mapping;
unsigned int ret;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
+ struct nf_nat_range2 newrange;
+#else
struct nf_nat_range newrange;
+#endif
__be32 new_ip, ip;
uint16_t port, original_port, want_port;