From: Phil Sutter Date: Wed, 15 Nov 2023 16:41:50 +0000 (+0100) Subject: nft-bridge: nft_bridge_add() uses wrong flags X-Git-Tag: v1.8.11~167 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a26212542c27fee2f5fcabd22abaf03e74d1c7fc;p=thirdparty%2Fiptables.git nft-bridge: nft_bridge_add() uses wrong flags When checking whether -s or -d was given, invflags were used by accident. This change has no functional effect since the values remain the same, but this way it's clear where the previously assigned flags are used. Signed-off-by: Phil Sutter --- diff --git a/iptables/nft-bridge.c b/iptables/nft-bridge.c index d9a8ad2b..772525e1 100644 --- a/iptables/nft-bridge.c +++ b/iptables/nft-bridge.c @@ -134,14 +134,14 @@ static int nft_bridge_add(struct nft_handle *h, struct nft_rule_ctx *ctx, struct ebt_entry *fw = &cs->eb; uint32_t op; - if (fw->bitmask & EBT_ISOURCE) { + if (fw->bitmask & EBT_SOURCEMAC) { op = nft_invflags2cmp(fw->invflags, EBT_ISOURCE); add_addr(h, r, NFT_PAYLOAD_LL_HEADER, offsetof(struct ethhdr, h_source), fw->sourcemac, fw->sourcemsk, ETH_ALEN, op); } - if (fw->bitmask & EBT_IDEST) { + if (fw->bitmask & EBT_DESTMAC) { op = nft_invflags2cmp(fw->invflags, EBT_IDEST); add_addr(h, r, NFT_PAYLOAD_LL_HEADER, offsetof(struct ethhdr, h_dest),