]> git.itanic.dy.fi Git - linux-stable/commit
vxcan: remove sk reference in peer skb
authorOliver Hartkopp <socketcan@hartkopp.net>
Wed, 9 Mar 2022 12:04:15 +0000 (13:04 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 10 Mar 2022 08:23:45 +0000 (09:23 +0100)
commit1574481bb3de11c9d44f5405c17e948b76794f39
treef43255a99adc8a7eda222a4344d8fba06ccbae09
parent9c0c191d82a1de964ac953a1df8b5744ec670b07
vxcan: remove sk reference in peer skb

With can_create_echo_skb() the skb which is forwarded to the peer CAN
interface shares the sk pointer from the originating socket.
This makes the CAN frame show up in the peer namespace as a TX packet.

With the use of skb_clone() analogue to the handling in gw.c the peer
skb gets a new start in the peer namespace and correctly appears as
a RX packet.

Link: https://lore.kernel.org/all/20220309120416.83514-4-socketcan@hartkopp.net
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/vxcan.c