diff options
author | delphij <delphij@FreeBSD.org> | 2012-05-17 05:11:57 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2012-05-17 05:11:57 +0000 |
commit | 661b9d94414ea6d11d5b7960aef1f172975ce52b (patch) | |
tree | 1720d207a135a239a304163c4635810a1094209a /contrib/tcpdump/print-atm.c | |
parent | 63ab347efe2621fc79f689a92c4bbda531593626 (diff) | |
parent | d36dcecdb3228d24b199eb51cfd7ac666f5b8eb8 (diff) | |
download | FreeBSD-src-661b9d94414ea6d11d5b7960aef1f172975ce52b.zip FreeBSD-src-661b9d94414ea6d11d5b7960aef1f172975ce52b.tar.gz |
Merge tcpdump 4.2.1.
MFC after: 2 weeks
Diffstat (limited to 'contrib/tcpdump/print-atm.c')
-rw-r--r-- | contrib/tcpdump/print-atm.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/tcpdump/print-atm.c b/contrib/tcpdump/print-atm.c index e679f74..b0fd6c2 100644 --- a/contrib/tcpdump/print-atm.c +++ b/contrib/tcpdump/print-atm.c @@ -272,10 +272,12 @@ sig_print(const u_char *p, int caplen) printf(":%s ", tok2str(msgtype2str, "msgtype#%d", p[MSG_TYPE_POS])); - if (caplen < CALL_REF_POS+3) { - printf("[|atm]"); - return; - } + /* + * The call reference comes before the message type, + * so if we know we have the message type, which we + * do from the caplen test above, we also know we have + * the call reference. + */ call_ref = EXTRACT_24BITS(&p[CALL_REF_POS]); printf("CALL_REF:0x%06x", call_ref); } else { |