aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipv6.c
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-06-11 23:15:01 +0100
committerAnders Broman <a.broman58@gmail.com>2016-06-13 21:15:10 +0000
commit4ca4768b561fca0e47f6736e24a616d50b931f79 (patch)
treebe975e11482012e95937e2c34ac473b188f29cca /epan/dissectors/packet-ipv6.c
parent4dad15150490c651f1c741f0caed442df46d543c (diff)
IPv6: Add text marker for SRH next segment
Change-Id: If13ffe4ddb9ae08e738ccf0c715dc12ce7a076e8 Reviewed-on: https://code.wireshark.org/review/15834 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ipv6.c')
-rw-r--r--epan/dissectors/packet-ipv6.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c
index d628117fb2..444c6c1b18 100644
--- a/epan/dissectors/packet-ipv6.c
+++ b/epan/dissectors/packet-ipv6.c
@@ -1109,6 +1109,9 @@ dissect_routing6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
}
ti = _proto_tree_add_ipv6_vector_address(rthdr_tree, hf_ipv6_routing_srh_addr, tvb,
offset, IPv6_ADDR_SIZE, addr, 0);
+ if (rt.ip6r_segleft == 1) {
+ proto_item_append_text(ti, " [next segment]");
+ }
dst_addr = addr;
offset += IPv6_ADDR_SIZE;
for (idx = 1; offset < offlim; offset += IPv6_ADDR_SIZE, idx++) {
@@ -1118,6 +1121,9 @@ dissect_routing6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
}
ti = _proto_tree_add_ipv6_vector_address(rthdr_tree, hf_ipv6_routing_srh_addr, tvb,
offset, IPv6_ADDR_SIZE, &srh_addr, idx);
+ if (idx == rt.ip6r_segleft - 1) {
+ proto_item_append_text(ti, " [next segment]");
+ }
}
rthdr_srh_addr_tree = proto_tree_add_subtree_format(rthdr_tree, tvb, offstart, srh_addr_count * IPv6_ADDR_SIZE,
@@ -1126,8 +1132,11 @@ dissect_routing6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
offset -= IPv6_ADDR_SIZE;
for (idx = srh_first_seg; offset >= offstart; offset -= IPv6_ADDR_SIZE, idx--) {
tvb_get_ipv6(tvb, offset, &srh_addr);
- _proto_tree_add_ipv6_vector_address(rthdr_srh_addr_tree, hf_ipv6_routing_srh_addr, tvb,
+ ti = _proto_tree_add_ipv6_vector_address(rthdr_srh_addr_tree, hf_ipv6_routing_srh_addr, tvb,
offset, IPv6_ADDR_SIZE, &srh_addr, idx);
+ if (idx == rt.ip6r_segleft - 1) {
+ proto_item_append_text(ti, " [next segment]");
+ }
}
}