forked from osmocom/wireshark
IPv6: SRH setup correct DA for pseudo header
When a Segment Routing Header is present in the IPv6 packet provisions
have to be made to setup the right destination address for the pseudo
header used in checksum calculations. When segments are left in the header
the first address in the list has to replace the destination address.
Closes #17097
(cherry picked from commit 7052994a19
)
This commit is contained in:
parent
3b13b3051f
commit
af66bef360
|
@ -1099,6 +1099,10 @@ dissect_routing6_srh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
|
|||
"IPv6 Type 4 Routing Header segments left field must not exceed address count (%u)", addr_count);
|
||||
}
|
||||
|
||||
if (pinfo->dst.type == AT_IPv6 && rt->hdr.ip6r_segleft > 0) {
|
||||
alloc_address_wmem_ipv6(pinfo->pool, &pinfo->dst, tvb_get_ptr_ipv6(tvb, offset));
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < addr_count; i++) {
|
||||
addr_offset = offset + i * IPv6_ADDR_SIZE;
|
||||
_proto_tree_add_ipv6_vector_address(tree, hf_ipv6_routing_srh_addr, tvb,
|
||||
|
|
Loading…
Reference in New Issue