Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

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>

authored by

Dmitry Skorodumov and committed by
Paolo Abeni
0c57ff00 5b48f49e

+3
+3
drivers/net/ipvlan/ipvlan_core.c
··· 737 737 struct ethhdr *eth = eth_hdr(skb); 738 738 rx_handler_result_t ret = RX_HANDLER_PASS; 739 739 740 + if (unlikely(skb->pkt_type == PACKET_LOOPBACK)) 741 + return RX_HANDLER_PASS; 742 + 740 743 if (is_multicast_ether_addr(eth->h_dest)) { 741 744 if (ipvlan_external_frame(skb, port)) { 742 745 struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC);