aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-07-15 22:54:59 +0100
committerJoão Valverde <j@v6e.pt>2016-07-15 22:07:18 +0000
commit9dd2674fada1f1b8cfed521b5ee4c3a4852a7ef9 (patch)
tree1ff40311ff23e84e7703c4f0c4d88b559d4069f1
parent4bf78ca75b610fbba3de63daf58af600ed2ef080 (diff)
IPv6: Minor loop cleanup
Change-Id: I73e11c353695a565d9c4222f2a3646d0530c3c40 Reviewed-on: https://code.wireshark.org/review/16482 Reviewed-by: João Valverde <j@v6e.pt>
-rw-r--r--epan/dissectors/packet-ipv6.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c
index ec64efd66e..63da78c878 100644
--- a/epan/dissectors/packet-ipv6.c
+++ b/epan/dissectors/packet-ipv6.c
@@ -2130,12 +2130,14 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
save_fragmented = pinfo->fragmented;
while (loop && !show_data) {
- /* Get a tvbuff for the options. */
+ advance = 0;
options_tvb = tvb_new_subset_remaining(tvb, offset);
nxt_handle = dissector_get_uint_handle(ipv6_next_header_dissector_table, nxt);
+ if (nxt_handle != NULL) {
+ advance = call_dissector_with_data(nxt_handle, options_tvb, pinfo, ipv6_exthdr_tree, &iph);
+ }
- if ((nxt_handle) &&
- ((advance = call_dissector_with_data(nxt_handle, options_tvb, pinfo, ipv6_exthdr_tree, &iph)) > 0)) {
+ if (advance > 0) {
nxt_saved = nxt;
nxt = tvb_get_guint8(tvb, offset);
offset += advance;