]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
nft-bridge: work around recent "among" decode breakage
authorFlorian Westphal <fw@strlen.de>
Wed, 30 Nov 2022 10:38:12 +0000 (11:38 +0100)
committerFlorian Westphal <fw@strlen.de>
Thu, 1 Dec 2022 10:03:58 +0000 (11:03 +0100)
ebtables-nft-save will fail with
"unknown meta key" when decoding "among" emulation with ipv4 or ipv6
addresses included.

This is because "meta protocol ip" is used as a dependency, but
its never decoded anywhere.

Skip this for now to restore the "ebtables/0006-flush_0"
test case.

Fixes: 25883ce88bfb ("nft: check for unknown meta keys")
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Phil Sutter <phil@nwl.cc>
iptables/nft-bridge.c

index 15dfc585c14abe951b4052b033c9be8b5a3b2382..8d002c17b53d36d329a439d4d671162b881c3e42 100644 (file)
@@ -197,6 +197,11 @@ static void nft_bridge_parse_meta(struct nft_xt_ctx *ctx,
        uint8_t invflags = 0;
        char iifname[IFNAMSIZ] = {}, oifname[IFNAMSIZ] = {};
 
+       switch (reg->meta_dreg.key) {
+       case NFT_META_PROTOCOL:
+               return;
+       }
+
        if (parse_meta(ctx, e, reg->meta_dreg.key, iifname, NULL, oifname, NULL, &invflags) < 0) {
                ctx->errmsg = "unknown meta key";
                return;