]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
xt_ECHO: support new function signature of security_skb_classify_flow
authorJan Engelhardt <jengelh@inai.de>
Wed, 20 Jan 2021 01:44:25 +0000 (02:44 +0100)
committerJan Engelhardt <jengelh@inai.de>
Wed, 20 Jan 2021 01:44:25 +0000 (02:44 +0100)
extensions/xt_ECHO.c

index f1e9600a8ea4e4a30399cf0143f57fba7f8dcfff..a0b718561db53ab468f86e17a05b5d991771d983 100644 (file)
@@ -97,7 +97,11 @@ echo_tg6(struct sk_buff *oldskb, const struct xt_action_param *par)
        memcpy(&fl.daddr, &newip->daddr, sizeof(fl.daddr));
        fl.fl6_sport = newudp->source;
        fl.fl6_dport = newudp->dest;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 11, 0)
+       security_skb_classify_flow((struct sk_buff *)oldskb, flowi6_to_flowi_common(&fl));
+#else
        security_skb_classify_flow((struct sk_buff *)oldskb, flowi6_to_flowi(&fl));
+#endif
        dst = ip6_route_output(net, NULL, &fl);
        if (dst == NULL || dst->error != 0) {
                dst_release(dst);