]> The Tcpdump Group git mirrors - tcpdump/commit
Moved source port equal BCM_LI_PORT to bottom of long if else chain
authorJonas Chianu <[email protected]>
Fri, 31 Mar 2023 16:24:22 +0000 (12:24 -0400)
committerfxlb <[email protected]>
Sun, 4 Jun 2023 19:11:25 +0000 (19:11 +0000)
commit10f7dff0c64e8ebb480cf48f5a09871e0d431761
tree3fd48db24766256e8b4cd36197418eeb2d25a673
parentec5cc2499c3bb86f0862e58354133954e8a213bf
Moved source port equal BCM_LI_PORT to bottom of long if else chain

BCM_LI_SHIM (BCM_LI_PORT) value is set to 49152, therefore when the
source port is 49152, it does not matter what the true destination is,
it defaults to Broadcom. So tcpdump interprets any packet with source
UDP port of 49152 as BCM_LI_SHIM (Broadcom). Ports 49152+, by
definition are ephemeral ports so it's totally reasonable that, for
example, BFD is using that source port for their packets. To prevent,
for example, BFD packets from being wrongly identified as BCM_LI_SHIM
packets, the "else if" statement has been moved to bottom of long chain.

Add a test file.
print-udp.c
tests/TESTLIST
tests/bfd_source_port_49152.out [new file with mode: 0644]
tests/bfd_source_port_49152.pcap [new file with mode: 0644]