diff options
author | Oliver Hartkopp <socketcan@hartkopp.net> | 2022-03-09 13:04:16 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2022-03-10 09:23:45 +0100 |
commit | 259bdba27e32368b4404f69d613b1c1014c07cbf (patch) | |
tree | da9d46a5dbfba5c05fcd9c1b99d10c9be2780eae /drivers/net/can/vxcan.c | |
parent | 1574481bb3de11c9d44f5405c17e948b76794f39 (diff) | |
download | linux-259bdba27e32368b4404f69d613b1c1014c07cbf.tar.gz linux-259bdba27e32368b4404f69d613b1c1014c07cbf.tar.bz2 linux-259bdba27e32368b4404f69d613b1c1014c07cbf.zip |
vxcan: enable local echo for sent CAN frames
The vxcan driver provides a pair of virtual CAN interfaces to exchange
CAN traffic between different namespaces - analogue to veth.
In opposite to the vcan driver the local sent CAN traffic on this interface
is not echo'ed back but only sent to the remote peer. This is unusual and
can be easily fixed by removing IFF_ECHO from the netdevice flags that
are set for vxcan interfaces by default at startup.
Without IFF_ECHO set on driver level, the local sent CAN frames are echo'ed
in af_can.c in can_send(). This patch makes vxcan interfaces adopt the
same local echo behavior and procedures as known from the vcan interfaces.
Fixes: a8f820a380a2 ("can: add Virtual CAN Tunnel driver (vxcan)")
Link: https://lore.kernel.org/all/20220309120416.83514-5-socketcan@hartkopp.net
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/vxcan.c')
-rw-r--r-- | drivers/net/can/vxcan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/vxcan.c b/drivers/net/can/vxcan.c index 51501af8d9fc..94a0c9c6a509 100644 --- a/drivers/net/can/vxcan.c +++ b/drivers/net/can/vxcan.c @@ -153,7 +153,7 @@ static void vxcan_setup(struct net_device *dev) dev->hard_header_len = 0; dev->addr_len = 0; dev->tx_queue_len = 0; - dev->flags = (IFF_NOARP|IFF_ECHO); + dev->flags = IFF_NOARP; dev->netdev_ops = &vxcan_netdev_ops; dev->needs_free_netdev = true; |