There's probably less DDP-over-UDP traffic passing through tcpdump these
days than, for example, SNMP v2 traffic from a low source port longer
than 512 bytes, so move the latter heuristic check after all the other
checks.
Fixes GitHub tcpdump issue #499.
- if (ND_TTEST(((const struct LAP *)cp)->type) &&
- ((const struct LAP *)cp)->type == lapDDP &&
- (atalk_port(sport) || atalk_port(dport))) {
- if (ndo->ndo_vflag)
- ND_PRINT((ndo, "kip "));
- llap_print(ndo, cp, length);
- return;
- }
}
if (ndo->ndo_vflag && !ndo->ndo_Kflag && !fragmented) {
}
if (ndo->ndo_vflag && !ndo->ndo_Kflag && !fragmented) {
geneve_print(ndo, (const u_char *)(up + 1), length);
else if (IS_SRC_OR_DST_PORT(LISP_CONTROL_PORT))
lisp_print(ndo, (const u_char *)(up + 1), length);
geneve_print(ndo, (const u_char *)(up + 1), length);
else if (IS_SRC_OR_DST_PORT(LISP_CONTROL_PORT))
lisp_print(ndo, (const u_char *)(up + 1), length);
+ else if (ND_TTEST(((const struct LAP *)cp)->type) &&
+ ((const struct LAP *)cp)->type == lapDDP &&
+ (atalk_port(sport) || atalk_port(dport))) {
+ if (ndo->ndo_vflag)
+ ND_PRINT((ndo, "kip "));
+ llap_print(ndo, cp, length);
+ } else {
if (ulen > length)
ND_PRINT((ndo, "UDP, bad length %u > %u",
ulen, length));
if (ulen > length)
ND_PRINT((ndo, "UDP, bad length %u > %u",
ulen, length));