From ebb94614f5dd2ff89d011c21090d124562eb6eeb Mon Sep 17 00:00:00 2001 From: sahlberg Date: Fri, 1 Apr 2005 21:04:55 +0000 Subject: update for padbyte on old juniper boxens git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14002 f5534014-38df-0310-8fa8-9805f1628bb7 --- epan/dissectors/packet-chdlc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-chdlc.c') diff --git a/epan/dissectors/packet-chdlc.c b/epan/dissectors/packet-chdlc.c index e081b3845a..9550544704 100644 --- a/epan/dissectors/packet-chdlc.c +++ b/epan/dissectors/packet-chdlc.c @@ -31,6 +31,7 @@ #include "etypes.h" #include #include "chdlctypes.h" +#include "nlpid.h" #include #include "packet-chdlc.h" #include "packet-ppp.h" @@ -127,16 +128,21 @@ chdlctype(guint16 chdlctype, tvbuff_t *tvb, int offset_after_chdlctype, int chdlctype_id) { tvbuff_t *next_tvb; + int padbyte = 0; if (tree) { proto_tree_add_uint(fh_tree, chdlctype_id, tvb, offset_after_chdlctype - 2, 2, chdlctype); } - if (chdlctype == CHDLCTYPE_OSI) { + padbyte = tvb_get_guint8(tvb, offset_after_chdlctype); + if (chdlctype == CHDLCTYPE_OSI && + !( padbyte == NLPID_ISO8473_CLNP || /* older Juniper SW does not send a padbyte */ + padbyte == NLPID_ISO9542_ESIS || + padbyte == NLPID_ISO10589_ISIS)) { /* There is a Padding Byte for CLNS protocols over Cisco HDLC */ proto_tree_add_text(fh_tree, tvb, offset_after_chdlctype, 1, "CLNS Padding: 0x%02x", - tvb_get_guint8(tvb, offset_after_chdlctype)); + padbyte); next_tvb = tvb_new_subset(tvb, offset_after_chdlctype + 1, -1, -1); } else { next_tvb = tvb_new_subset(tvb, offset_after_chdlctype, -1, -1); -- cgit v1.2.3