diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-04-17 19:47:29 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-04-17 19:47:29 -0700 |
commit | cd81326386002beb5c4df6550350860568e2a682 (patch) | |
tree | 7fdcf52aba330a51d69801c0e67c416107539528 | |
parent | 2c5e14ceac8b545c869906f4d81c1e95a0c548a0 (diff) | |
download | tcpdump-cd81326386002beb5c4df6550350860568e2a682.tar.gz |
Fix the printing of RFC 948-style IP packets.
They have a 3-octet LLC UI frame followed *immediately* by an IP packet;
the payload is 3 bytes, not 4 bytes, past the LLC header.
-rw-r--r-- | print-llc.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/print-llc.c b/print-llc.c index 5681b495..65c08c08 100644 --- a/print-llc.c +++ b/print-llc.c @@ -255,12 +255,13 @@ llc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, if (ssap == LLCSAP_IP && dsap == LLCSAP_IP && control == LLC_UI) { - if (caplen < 4 || length < 4) { - ND_PRINT((ndo, "[|llc]")); - ND_DEFAULTPRINT((u_char *)p, caplen); - return (1); - } - ip_print(ndo, p+4, length-4); + /* + * This is an RFC 948-style IP packet, with + * an 802.3 header and an 802.2 LLC header + * with the source and destination SAPs being + * the IP SAP. + */ + ip_print(ndo, p+3, length-3); return (1); } |