From 0cc51e6b350bbfe55b33c38621570443effa41ef Mon Sep 17 00:00:00 2001 From: Paolo Pisati Date: Wed, 13 Nov 2019 16:30:17 +0000 Subject: [PATCH] build: add support for Linux 5.4 --- extensions/xt_TARPIT.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extensions/xt_TARPIT.c b/extensions/xt_TARPIT.c index 708e1c2..4926f2e 100644 --- a/extensions/xt_TARPIT.c +++ b/extensions/xt_TARPIT.c @@ -205,7 +205,11 @@ static void tarpit_tcp4(struct net *net, struct sk_buff *oldskb, return; /* This packet will not be the same as the other: clear nf fields */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) + nf_reset_ct(nskb); +#else nf_reset(nskb); +#endif skb_nfmark(nskb) = 0; skb_init_secmark(nskb); skb_shinfo(nskb)->gso_size = 0; @@ -346,7 +350,11 @@ static void tarpit_tcp6(struct net *net, struct sk_buff *oldskb, } /* This packet will not be the same as the other: clear nf fields */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0) + nf_reset_ct(nskb); +#else nf_reset(nskb); +#endif skb_nfmark(nskb) = 0; skb_init_secmark(nskb); skb_shinfo(nskb)->gso_size = 0; -- 2.47.2