udp6: Use Segment Routing Header for dest address if present
authorAndrew Lunn <andrew@lunn.ch>
Mon, 3 Jan 2022 17:11:32 +0000 (18:11 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Jan 2022 12:17:35 +0000 (12:17 +0000)
commit222a011efc839ca1f51bf89fe7a2b3705fa55ccd
treeaf54a38b1570fc9bbade6c094f7b12d4151c86cb
parente41294408c56c68ea0f269d757527bf33b39118a
udp6: Use Segment Routing Header for dest address if present

When finding the socket to report an error on, if the invoking packet
is using Segment Routing, the IPv6 destination address is that of an
intermediate router, not the end destination. Extract the ultimate
destination address from the segment address.

This change allows traceroute to function in the presence of Segment
Routing.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/seg6.h
net/ipv6/udp.c