candump: try to switch bridge socket into CAN FD mode
When using the -b/-B option to send received CAN frames to the brigde interface the sending failed when processing CAN FD frames. This patch enables CAN FD on the socket for the bridging interface. https://github.com/linux-can/can-utils/issues/104 Reported-by: https://github.com/jm3lee Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>pull/142/head
parent
8681e57230
commit
c45a17e96b
|
|
@ -325,6 +325,9 @@ int main(int argc, char **argv)
|
|||
/* disable default receive filter on this write-only RAW socket */
|
||||
setsockopt(bridge, SOL_CAN_RAW, CAN_RAW_FILTER, NULL, 0);
|
||||
|
||||
/* try to switch the bridge socket into CAN FD mode */
|
||||
setsockopt(bridge, SOL_CAN_RAW, CAN_RAW_FD_FRAMES, &canfd_on, sizeof(canfd_on));
|
||||
|
||||
if (opt == 'B') {
|
||||
const int loopback = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue