Re: [bpf, xdp] headroom - was: Re: Question about to KMSAN: uninit-value in can_receive
From: Jakub Kicinski
Date: Tue Jan 06 2026 - 19:23:07 EST
On Tue, 6 Jan 2026 13:04:41 +0100 Oliver Hartkopp wrote:
> When such skb is echo'ed back after successful transmission via
> netif_rx() this leads to skb->skb_iif = skb->dev->ifindex;
>
> To prevent a loopback the CAN frame must not be sent back to the
> originating interface - even when it has been routed to different CAN
> interfaces in the meantime (which always overwrites skb_iif).
>
> Therefore we need to maintain the "real original" incoming interface.
Alternatively perhaps for this particular use case you could use
something like metadata_dst to mark the frame as forwarded / annotate
with the originating ifindex?