]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
build: add support for Linux 5.4
authorPaolo Pisati <paolo.pisati@canonical.com>
Wed, 13 Nov 2019 16:30:17 +0000 (16:30 +0000)
committerJan Engelhardt <jengelh@inai.de>
Wed, 20 Nov 2019 21:45:18 +0000 (22:45 +0100)
extensions/xt_TARPIT.c

index 708e1c28df7aeae69ad5163b327027f9a011bcb7..4926f2e694e1157a74477423cedead61b8536b20 100644 (file)
@@ -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;