I just made a patch file for fixing the 2 problems below.
Please check.
> [Ethereal OSPFv3]
> I have 2 questions in treatment of an AS-External-LSA.
>
> (1) metric
> It seems that treatment of a metric value is someting wrong.
>
> It's a 24-bit value, but Ethereal treats it as a 16-bit value.
>
> (2) Referenced LS type
> It seems that a pointer to Referenced LS type is something wrong.
>
> It points to the address of a part of a metric value.
>
Index: packet-ospf.c
===================================================================
RCS file: /cvsroot/ethereal/packet-ospf.c,v
retrieving revision 1.51
diff -u -r1.51 packet-ospf.c
--- packet-ospf.c 2001/12/03 03:59:37 1.51
+++ packet-ospf.c 2001/12/05 12:27:06
@@ -1476,7 +1476,7 @@
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 @@
/* 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, v
3_ls_type_vals, "Unknown"));
offset+=8;