diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2017-08-30 15:14:29 +0100 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2017-08-30 15:30:28 +0000 |
commit | 71697c5dab92e5be15180c6fb4420fd847e1e539 (patch) | |
tree | fd3b03aa971e6382a02cb327e12201aa52855ac8 /epan/dissectors/packet-mip6.c | |
parent | 324658271690d7ce4482e039a205ddaca3e1d18c (diff) |
IPv6: Move duplicate code to update IPv6 dissection state to a function
Also make sure to protect ipv6_pinfo access with NULL checks.
Change-Id: I9495421c6bf970cb7eaa0415aa1af7effd3e7c79
Reviewed-on: https://code.wireshark.org/review/23309
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'epan/dissectors/packet-mip6.c')
-rw-r--r-- | epan/dissectors/packet-mip6.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/epan/dissectors/packet-mip6.c b/epan/dissectors/packet-mip6.c index 0de0b45242..81cc2a49f0 100644 --- a/epan/dissectors/packet-mip6.c +++ b/epan/dissectors/packet-mip6.c @@ -3810,15 +3810,7 @@ dissect_mip6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) pproto = tvb_get_guint8(tvb, MIP6_PROTO_OFF); root_tree = tree; - if (pinfo->dst.type == AT_IPv6) { - ipv6_pinfo_t *ipv6_pinfo = p_get_ipv6_pinfo(pinfo); - - ipv6_pinfo->frag_plen -= len; - if (ipv6_pinfo->ipv6_tree != NULL) { - root_tree = ipv6_pinfo->ipv6_tree; - ipv6_pinfo->ipv6_item_len += len; - } - } + p_update_ipv6_pinfo(pinfo, &root_tree, len); ti = proto_tree_add_item(root_tree, proto_mip6, tvb, 0, len, ENC_NA); mip6_tree = proto_item_add_subtree(ti, ett_mip6); |