]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/bridge/netfilter/ebt_stp.c
netfilter: x_tables: add context to know if extension runs from nft_compat
[karo-tx-linux.git] / net / bridge / netfilter / ebt_stp.c
index 071d87214dde44754f2ec98da167fcd8477a541c..0c40570069ba28ce87d2fcd9883224e0ff4588e6 100644 (file)
@@ -164,8 +164,10 @@ static int ebt_stp_mt_check(const struct xt_mtchk_param *par)
            !(info->bitmask & EBT_STP_MASK))
                return -EINVAL;
        /* Make sure the match only receives stp frames */
-       if (!ether_addr_equal(e->destmac, bridge_ula) ||
-           !ether_addr_equal(e->destmsk, msk) || !(e->bitmask & EBT_DESTMAC))
+       if (!par->nft_compat &&
+           (!ether_addr_equal(e->destmac, bridge_ula) ||
+            !ether_addr_equal(e->destmsk, msk) ||
+            !(e->bitmask & EBT_DESTMAC)))
                return -EINVAL;
 
        return 0;