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.
(backported from commit
10f7dff0c64e8ebb480cf48f5a09871e0d431761)
(IP_V(ip) == 6) ? 1 : 0);
else if (IS_SRC_OR_DST_PORT(MPLS_LSP_PING_PORT))
lspping_print(ndo, cp, length);
- else if (sport == BCM_LI_PORT)
- bcm_li_print(ndo, cp, length);
else if (dport == BFD_CONTROL_PORT ||
dport == BFD_MULTIHOP_PORT ||
dport == BFD_LAG_PORT ||
ptp_print(ndo, cp, length);
} else if (IS_SRC_OR_DST_PORT(SOMEIP_PORT))
someip_print(ndo, cp, length);
+ else if (sport == BCM_LI_PORT)
+ bcm_li_print(ndo, cp, length);
else {
if (ulen > length && !fragmented)
ND_PRINT("UDP, bad length %u > %u",
bfd-multihop-v bfd-multihop.pcap bfd-multihop-v.out -v
bfd-lag bfd-lag.pcap bfd-lag.out
bfd-lag-v bfd-lag.pcap bfd-lag-v.out -v
+# BFD with source port 49152
+bfd_source_port_49152 bfd_source_port_49152.pcap bfd_source_port_49152.out -v
# Arista Vendor Specific Tests
arista-ether arista_ether.pcap arista_ether.out
--- /dev/null
+ 1 09:58:19.559328 IP (tos 0xe0, ttl 255, id 40257, offset 0, flags [DF], proto UDP (17), length 52)
+ 11.11.11.2.49152 > 11.11.11.1.3784: BFDv1, length: 24
+ Control, State Up, Flags: [Control Plane Independent], Diagnostic: No Diagnostic (0x00)
+ Detection Timer Multiplier: 3 (300 ms Detection time), BFD Length: 24
+ My Discriminator: 0x80000001, Your Discriminator: 0x80000001
+ Desired min Tx Interval: 100 ms
+ Required min Rx Interval: 100 ms
+ Required min Echo Interval: 0 ms