Skip to contentSkip to conversation

nft-bridge: work around recent "among" decode breakage

PATCH In review Florian Westphal 2 participants 2 messages Nov 30, 2022 netfilter

lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 nft-bridge: work around recent "among" decode breakage

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")
---
 iptables/nft-bridge.c | 5 +++++
 1 file changed, 5 insertions(+)
iptables/nft-bridge.c +5 -0
index 3180091364fa..50e90b22cf2f 100644
@@ -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;
Signature · 1 line
2.38.1
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Florian Westphal

ebtables-nft-save will fail with
"unknown meta key" when decoding "among" emulation with ipv4 or ipv6 addresses included.

Quoted 8 lines

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")

Best-effort approach. :)