]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipvlan: Ignore PACKET_LOOPBACK in handle_mode_l2()
authorDmitry Skorodumov <skorodumov.dmitry@huawei.com>
Tue, 2 Dec 2025 10:39:03 +0000 (13:39 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:09:43 +0000 (13:09 +0100)
commit194cd36ec05df7ab5347a60caf3dc4dd2ded7e8d
tree0e57a8766ca02db9a60407ca85e9f9b0abec5738
parentc7f6e7cc14df72b997258216e99d897d2df0dbbd
ipvlan: Ignore PACKET_LOOPBACK in handle_mode_l2()

[ Upstream commit 0c57ff008a11f24f7f05fa760222692a00465fec ]

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.

Fixes: 2ad7bf363841 ("ipvlan: Initial check-in of the IPVLAN driver.")
Signed-off-by: Dmitry Skorodumov <skorodumov.dmitry@huawei.com>
Link: https://patch.msgid.link/20251202103906.4087675-1-skorodumov.dmitry@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ipvlan/ipvlan_core.c