summaryrefslogtreecommitdiffstats
path: root/iptables
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2023-11-15 17:41:50 +0100
committerPhil Sutter <phil@nwl.cc>2023-11-23 17:59:42 +0100
commita26212542c27fee2f5fcabd22abaf03e74d1c7fc (patch)
treedbaff502b8fa98103ba5589d014f3414da325e72 /iptables
parent68ff869e94a1b72a3952170a0d8f661069b15a59 (diff)
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 <phil@nwl.cc>
Diffstat (limited to 'iptables')
-rw-r--r--iptables/nft-bridge.c4
1 files 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),