Skip to content

Commit cb26db3

Browse files
committed
Linux: fix a comment.
DOn't speak of "CAN or CAN FD"; speak just of CAN, as 1) the original CAN is now called "CAN CC" and 2) there's also CAN XL. The *code* doesn't need to change, as it doesn't check for particular types of CAN frames, it just checks for ARPHRD_CAN. (cherry picked from commit 70fec93)
1 parent f5c497c commit cb26db3

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

pcap-linux.c

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,19 +1366,17 @@ linux_check_direction(const pcap_t *handle, const struct sockaddr_ll *sll)
13661366
return 0;
13671367

13681368
/*
1369-
* If this is an outgoing CAN or CAN FD frame, and
1370-
* the user doesn't only want outgoing packets,
1371-
* reject it; CAN devices and drivers, and the CAN
1372-
* stack, always arrange to loop back transmitted
1373-
* packets, so they also appear as incoming packets.
1374-
* We don't want duplicate packets, and we can't
1375-
* easily distinguish packets looped back by the CAN
1376-
* layer than those received by the CAN layer, so we
1377-
* eliminate this packet instead.
1369+
* If this is an outgoing CAN frame, and the user doesn't
1370+
* want only outgoing packets, reject it; CAN devices
1371+
* and drivers, and the CAN stack, always arrange to
1372+
* loop back transmitted packets, so they also appear
1373+
* as incoming packets. We don't want duplicate packets,
1374+
* and we can't easily distinguish packets looped back
1375+
* by the CAN layer than those received by the CAN layer,
1376+
* so we eliminate this packet instead.
13781377
*
1379-
* We check whether this is a CAN or CAN FD frame
1380-
* by checking whether the device's hardware type
1381-
* is ARPHRD_CAN.
1378+
* We check whether this is a CAN frame by checking whether
1379+
* the device's hardware type is ARPHRD_CAN.
13821380
*/
13831381
if (sll->sll_hatype == ARPHRD_CAN &&
13841382
handle->direction != PCAP_D_OUT)

0 commit comments

Comments
 (0)