]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/netfilter/xt_TCPMSS.c
netfilter: x_tables: add context to know if extension runs from nft_compat
[karo-tx-linux.git] / net / netfilter / xt_TCPMSS.c
index e762de5ee89bfa480b1789ce164cb024ac35e91e..8c3190e2fc6abad6394ba5498762ba0502c34d58 100644 (file)
@@ -277,6 +277,9 @@ static int tcpmss_tg4_check(const struct xt_tgchk_param *par)
                        "FORWARD, OUTPUT and POSTROUTING hooks\n");
                return -EINVAL;
        }
+       if (par->nft_compat)
+               return 0;
+
        xt_ematch_foreach(ematch, e)
                if (find_syn_match(ematch))
                        return 0;
@@ -299,6 +302,9 @@ static int tcpmss_tg6_check(const struct xt_tgchk_param *par)
                        "FORWARD, OUTPUT and POSTROUTING hooks\n");
                return -EINVAL;
        }
+       if (par->nft_compat)
+               return 0;
+
        xt_ematch_foreach(ematch, e)
                if (find_syn_match(ematch))
                        return 0;