diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-09-11 06:38:57 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-09-11 06:38:57 +0000 |
commit | b6ac95ef200655b61e84578158a020580456ca72 (patch) | |
tree | afc8708f123c6e338dc8e3e3d9a153b7882f5396 /packet-ospf.c | |
parent | 65ac4971d23f3d20b8b63cdbcc3d15e2fef94410 (diff) | |
download | wireshark-b6ac95ef200655b61e84578158a020580456ca72.tar.gz wireshark-b6ac95ef200655b61e84578158a020580456ca72.tar.bz2 wireshark-b6ac95ef200655b61e84578158a020580456ca72.zip |
Fix some bugs (and some indentation).
svn path=/trunk/; revision=3918
Diffstat (limited to 'packet-ospf.c')
-rw-r--r-- | packet-ospf.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/packet-ospf.c b/packet-ospf.c index 066ed6365e..7206a860a0 100644 --- a/packet-ospf.c +++ b/packet-ospf.c @@ -2,7 +2,7 @@ * Routines for OSPF packet disassembly * (c) Copyright Hannes R. Boehm <hannes@boehm.org> * - * $Id: packet-ospf.c,v 1.43 2001/09/05 19:53:41 guy Exp $ + * $Id: packet-ospf.c,v 1.44 2001/09/11 06:38:57 guy Exp $ * * At this time, this module is able to analyze OSPF * packets as specified in RFC2328. MOSPF (RFC1584) and other @@ -533,10 +533,11 @@ dissect_ospf_db_desc(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 version tvb_get_ntohl(tvb, offset + 4)); offset += 8; + break; case OSPF_VERSION_3: - reserved = tvb_get_guint8(tvb, 16); + reserved = tvb_get_guint8(tvb, offset); proto_tree_add_text(ospf_db_desc_tree, tvb, offset, 1, (reserved == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"), reserved); @@ -545,7 +546,7 @@ dissect_ospf_db_desc(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 version proto_tree_add_text(ospf_db_desc_tree, tvb, offset + 4, 2, "Interface MTU: %u", tvb_get_ntohs(tvb, offset+4)); - reserved = tvb_get_guint8(tvb, 22); + reserved = tvb_get_guint8(tvb, offset + 6); proto_tree_add_text(ospf_db_desc_tree, tvb, offset + 6, 1, (reserved == 0 ? "Reserved: %u" : "Reserved: %u (incorrect, should be 0)"), reserved); @@ -569,15 +570,12 @@ dissect_ospf_db_desc(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 version tvb_get_ntohl(tvb, offset + 8)); offset += 12; - - break; - - - default: - break; - } + break; + default: + break; + } } /* LS Headers will be processed here */ |