isotpsniffer: fix missing CAN FD support on second listen socket

When sniffing CAN FD isotp traffic both listen-only sockets have to be
switched to process CAN FD frames.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
pull/486/head
Oliver Hartkopp 2023-12-08 17:06:36 +01:00
parent 88f0c75334
commit 7affaf217e
1 changed files with 6 additions and 0 deletions

View File

@ -304,6 +304,12 @@ int main(int argc, char **argv)
setsockopt(s, SOL_CAN_ISOTP, CAN_ISOTP_OPTS, &opts, sizeof(opts)); setsockopt(s, SOL_CAN_ISOTP, CAN_ISOTP_OPTS, &opts, sizeof(opts));
if ((llopts.mtu) && (setsockopt(s, SOL_CAN_ISOTP, CAN_ISOTP_LL_OPTS, &llopts, sizeof(llopts))) < 0) {
perror("setsockopt");
r = 1;
goto out;
}
addr.can_addr.tp.tx_id = src; addr.can_addr.tp.tx_id = src;
addr.can_addr.tp.rx_id = dst; addr.can_addr.tp.rx_id = dst;