[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241005014514.1541240-1-ingamedeo@gmail.com>
Date: Fri, 4 Oct 2024 18:44:58 -0700
From: Amedeo Baragiola <ingamedeo@...il.com>
To:
Cc: Amedeo Baragiola <ingamedeo@...il.com>,
Roopa Prabhu <roopa@...dia.com>,
Nikolay Aleksandrov <razor@...ckwall.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
bridge@...ts.linux.dev,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] bridge: use promisc arg instead of skb flags
Since commit 751de2012eaf ("netfilter: br_netfilter: skip conntrack input hook for promisc packets")
a second argument (promisc) has been added to br_pass_frame_up which
represents whether the interface is in promiscuous mode. However,
internally - in one remaining case - br_pass_frame_up checks the device
flags derived from skb instead of the argument being passed in.
This one-line changes addresses this inconsistency.
Signed-off-by: Amedeo Baragiola <ingamedeo@...il.com>
---
net/bridge/br_input.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index ceaa5a89b947..156c18f42fa3 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -50,8 +50,7 @@ static int br_pass_frame_up(struct sk_buff *skb, bool promisc)
* packet is allowed except in promisc mode when someone
* may be running packet capture.
*/
- if (!(brdev->flags & IFF_PROMISC) &&
- !br_allowed_egress(vg, skb)) {
+ if (!promisc && !br_allowed_egress(vg, skb)) {
kfree_skb(skb);
return NET_RX_DROP;
}
--
2.46.2
Powered by blists - more mailing lists