* [PATCH] hsr: prp: honor master promisc mode for local delivery with macvlan
@ 2026-07-22 4:16 Aravind Krishna
0 siblings, 0 replies; only message in thread
From: Aravind Krishna @ 2026-07-22 4:16 UTC (permalink / raw)
To: netdev; +Cc: kuba, pabeni, edumazet, horms, davem, linux-kernel,
Aravind Krishna
When running MACVLAN over PRP, packets can be expected to be delivered
to the local stack when the PRP/HSR master is in promiscuous mode.
Update local destination handling in check_local_dest() so that if the
master device exists and has IFF_PROMISC set, the packet is marked
PACKET_HOST and treated as local destination.
This enables expected receive behavior for MACVLAN over PRP setups.
Signed-off-by: Aravind-kris <aravindkrishhna@gmail.com>
---
net/hsr/hsr_forward.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/net/hsr/hsr_forward.c b/net/hsr/hsr_forward.c
index 0774981a65c1..38ed6b09fc4a 100644
--- a/net/hsr/hsr_forward.c
+++ b/net/hsr/hsr_forward.c
@@ -589,6 +589,8 @@ static void hsr_forward_do(struct hsr_frame_info *frame)
static void check_local_dest(struct hsr_priv *hsr, struct sk_buff *skb,
struct hsr_frame_info *frame)
{
+ struct hsr_port *master;
+
if (hsr_addr_is_self(hsr, eth_hdr(skb)->h_dest)) {
frame->is_local_exclusive = true;
skb->pkt_type = PACKET_HOST;
@@ -600,8 +602,24 @@ static void check_local_dest(struct hsr_priv *hsr, struct sk_buff *skb,
skb->pkt_type == PACKET_MULTICAST ||
skb->pkt_type == PACKET_BROADCAST) {
frame->is_local_dest = true;
- } else {
- frame->is_local_dest = false;
+ }
+ else
+ {
+ master = hsr_port_get_hsr(hsr, HSR_PT_MASTER);
+
+ if (!master || !master->dev)
+ {
+ frame->is_local_dest = false;
+ }
+ else if (master->dev->flags & IFF_PROMISC)
+ {
+ skb->pkt_type = PACKET_HOST;
+ frame->is_local_dest = true;
+ }
+ else
+ {
+ frame->is_local_dest = false;
+ }
}
}
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-22 4:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-22 4:16 [PATCH] hsr: prp: honor master promisc mode for local delivery with macvlan Aravind Krishna
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox