can: gw: give feedback on missing CGW_FLAGS_CAN_IIF_TX_OK flag
authorOliver Hartkopp <socketcan@hartkopp.net>
Wed, 25 Jan 2023 05:54:07 +0000 (06:54 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 2 Feb 2023 14:42:10 +0000 (15:42 +0100)
commit2a30b2bd01c23a7eeace3a3f82c2817227099805
tree385ea64e80c3a28b27c29d0136b6e7ede81a256f
parent609aa68d60965f70485655def733d533f99b341b
can: gw: give feedback on missing CGW_FLAGS_CAN_IIF_TX_OK flag

To send CAN traffic back to the incoming interface a special flag has to
be set. When creating a routing job for identical interfaces without this
flag the rule is created but has no effect.

This patch adds an error return value in the case that the CAN interfaces
are identical but the CGW_FLAGS_CAN_IIF_TX_OK flag was not set.

Reported-by: Jannik Hartung <jannik.hartung@tu-bs.de>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://lore.kernel.org/all/20230125055407.2053-1-socketcan@hartkopp.net
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
net/can/gw.c