From a26212542c27fee2f5fcabd22abaf03e74d1c7fc Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Wed, 15 Nov 2023 17:41:50 +0100 Subject: 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 --- iptables/nft-bridge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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), -- cgit v1.2.3