[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251120174949.3827500-12-skorodumov.dmitry@huawei.com>
Date: Thu, 20 Nov 2025 20:49:48 +0300
From: Dmitry Skorodumov <skorodumov.dmitry@...wei.com>
To: <netdev@...r.kernel.org>, Dmitry Skorodumov
<skorodumov.dmitry@...wei.com>, Jakub Kicinski <kuba@...nel.org>, Ido
Schimmel <idosch@...dia.com>, Eric Dumazet <edumazet@...gle.com>, Julian
Vetter <julian@...er-limits.org>, Guillaume Nault <gnault@...hat.com>,
<linux-kernel@...r.kernel.org>
CC: <andrey.bokhanko@...wei.com>, Andrew Lunn <andrew+netdev@...n.ch>, "David
S. Miller" <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>
Subject: [PATCH net-next 11/12] ipvlan: Ignore PACKET_LOOPBACK in handle_mode_l2()
Packets with pkt_type == PACKET_LOOPBACK are captured by
handle_frame() function, but they don't have L2 header.
We should not process them in handle_mode_l2().
This doesn't affect old L2 functionality, since handling
was anyway incorrect.
Handle them the same way as in br_handle_frame():
just pass the skb.
To observe invalid behaviour, just start "ping -b" on bcast address
of port-interface.
Signed-off-by: Dmitry Skorodumov <skorodumov.dmitry@...wei.com>
---
drivers/net/ipvlan/ipvlan_core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c
index ce6202667159..ba2bea5f0a1a 100644
--- a/drivers/net/ipvlan/ipvlan_core.c
+++ b/drivers/net/ipvlan/ipvlan_core.c
@@ -1157,6 +1157,9 @@ static rx_handler_result_t ipvlan_handle_mode_l2(struct sk_buff **pskb,
struct sk_buff *skb = *pskb;
bool need_eth_fix;
+ if (unlikely(skb->pkt_type == PACKET_LOOPBACK))
+ return RX_HANDLER_PASS;
+
/* Ignore already seen packets. */
if (ipvlan_is_skb_marked(skb, port->dev))
return RX_HANDLER_PASS;
--
2.25.1
Powered by blists - more mailing lists