OSPFv3 RI decode error
Summary
The OSPFv3 dissector fails to decode subsequent LSAs after encountering an RI LSA.
Steps to reproduce
please load the attached ospf3.pcap file frame 1 and check what happens after decoding LSA number 3 (LSA-type 12).
What is the current bug behavior?
Subsequent LSA following a RI LSA in a OSPFv3 update packet are not properly decoded. Wireshark complains about malformed packets.
What is the expected correct behavior?
No warning about malformed packets. proper decoding of packets beyond the RI LSA.
Sample capture file
The following patch fixes the issue
diff --git a/epan/dissectors/packet-ospf.c b/epan/dissectors/packet-ospf.c
index daa1d57dfc..123c3c4b72 100644
--- a/epan/dissectors/packet-ospf.c
+++ b/epan/dissectors/packet-ospf.c
@@ -4254,6 +4254,7 @@ dissect_ospf_v3_lsa(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *t
case OSPF_V3_LSTYPE_OPAQUE_RI:
dissect_ospf_lsa_opaque_ri(tvb, pinfo, offset, ospf_lsa_tree, ls_length);
+ offset += ls_length;
break;
default:
Relevant logs and/or screenshots
(Paste any relevant logs)
Build information
(In Wireshark, select Help->About Wireshark from the main menu and use the button "Copy To Clipboard". Please paste the complete output here. Or from the command line, run `tshark -v` or `wireshark -v`)
Edited by Hannes Gredler