aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-12-05 20:16:41 +0000
committerGuy Harris <guy@alum.mit.edu>2001-12-05 20:16:41 +0000
commit550c9bb7bfe771783f31abc9ad2025d13558ea5b (patch)
treef57dba293f38041a7dde97d228eb05ce8c31153e
parentee1094b140459cda7dc16098187b637f4eaf354d (diff)
From Taisuke Sasaki: fix the handling of the metric and referenced LS
type fields in OSPFv3 packets. Clean up white space. svn path=/trunk/; revision=4338
-rw-r--r--AUTHORS2
-rw-r--r--packet-ospf.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/AUTHORS b/AUTHORS
index 7fdb06e671..8e15c6c550 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -921,7 +921,7 @@ Raghu Angadi <rangadi[AT]inktomi.com> {
}
Taisuke Sasaki <sasaki[AT]soft.net.fujitsu.co.jp> {
- OSPFv3 checksum fix
+ OSPFv3 fixes
}
Tim Newsham <newsham[AT]lava.net> {
diff --git a/packet-ospf.c b/packet-ospf.c
index c60e822fd8..b393ff4d66 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.51 2001/12/03 03:59:37 guy Exp $
+ * $Id: packet-ospf.c,v 1.52 2001/12/05 20:16:41 guy Exp $
*
* At this time, this module is able to analyze OSPF
* packets as specified in RFC2328. MOSPF (RFC1584) and other
@@ -91,7 +91,7 @@ static const value_string auth_vals[] = {
#define OSPF_V2_OPTIONS_EA 0x10
#define OSPF_V2_OPTIONS_DC 0x20
#define OSPF_V2_OPTIONS_O 0x40
-#define OSPF_V2_OPTIONS_DN 0x01
+#define OSPF_V2_OPTIONS_DN 0x01
#define OSPF_V3_OPTIONS_V6 0x01
#define OSPF_V3_OPTIONS_E 0x02
#define OSPF_V3_OPTIONS_MC 0x04
@@ -1476,7 +1476,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
flags, flags_string);
/* 24 bits metric */
- metric=tvb_get_ntohs(tvb, offset+1);
+ metric=tvb_get_ntoh24(tvb, offset+1);
proto_tree_add_text(ospf_lsa_tree, tvb, offset+1, 3,
"Metric: %u", metric);
@@ -1489,7 +1489,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
/* referenced LS type */
referenced_ls_type=tvb_get_ntohs(tvb, offset+6);
- proto_tree_add_text(ospf_lsa_tree, tvb, offset+2, 2,"Referenced LS type 0x%04x (%s)",
+ proto_tree_add_text(ospf_lsa_tree, tvb, offset+6, 2,"Referenced LS type 0x%04x (%s)",
referenced_ls_type, val_to_str(referenced_ls_type, v3_ls_type_vals, "Unknown"));
offset+=8;
@@ -1578,7 +1578,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
/* referenced LS type */
referenced_ls_type=tvb_get_ntohs(tvb, offset+2);
- proto_tree_add_text(ospf_lsa_tree, tvb, offset+2, 2,"Referenced LS type 0x%04x (%s)",
+ proto_tree_add_text(ospf_lsa_tree, tvb, offset+2, 2,"Referenced LS type 0x%04x (%s)",
referenced_ls_type, val_to_str(referenced_ls_type, v3_ls_type_vals, "Unknown"));
/* Referenced Link State ID */