aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ismp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-01-03 03:37:26 +0000
committerGuy Harris <guy@alum.mit.edu>2004-01-03 03:37:26 +0000
commit348c38a211523c12637254a56c08f664fdd7823f (patch)
tree07597a695189f6f5c2baf94b40fca8cd2fdfa751 /packet-ismp.c
parent58a591bb00715cff24f70e692d19f9ef02e36f40 (diff)
Deal with some weird ISMP packets that have 0x42 0x42 0x03 in front of
the payload (are they some kind of weird 802.2 header? 0x42 is the SAP for IEEE 802.1d Spanning Tree BPDUs). svn path=/trunk/; revision=9529
Diffstat (limited to 'packet-ismp.c')
-rw-r--r--packet-ismp.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/packet-ismp.c b/packet-ismp.c
index 0f101bb737..9fe6eaddcd 100644
--- a/packet-ismp.c
+++ b/packet-ismp.c
@@ -3,7 +3,7 @@
* Enterasys Networks Home: http://www.enterasys.com/
* Copyright 2003, Joshua Craig Douglas <jdouglas@enterasys.com>
*
- * $Id: packet-ismp.c,v 1.2 2003/12/30 19:11:30 jmayer Exp $
+ * $Id: packet-ismp.c,v 1.3 2004/01/03 03:37:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -500,6 +500,7 @@ dissect_ismp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int offset = 0;
guint16 message_type = 0;
guint8 code_length = 0;
+ guint8 weird_stuff[3] = { 0x42, 0x42, 0x03 };
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti;
@@ -511,7 +512,15 @@ dissect_ismp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
-
+ /*
+ * XXX - I've seen captures with packets that have the ISMP
+ * Ethernet frame type, but with the payload being 0x42 0x42 0x03
+ * followed by what appears to be an ISMP frame.
+ *
+ * 0x4242 is not a valid ISMP version number.
+ */
+ if (tvb_memeql(tvb, offset, weird_stuff, sizeof weird_stuff) == 0)
+ offset += 3; /* skip the weird stuff, for now */
if (tree) {
/* create display subtree for ismp */
ti = proto_tree_add_item(tree, proto_ismp, tvb, offset, -1, FALSE);