All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v4 0/3] Fix traceroute in the presence of SRv6
@ 2021-12-08 17:38 Andrew Lunn
  2021-12-08 17:38 ` [PATCH net-next v4 1/3] seg6: export get_srh() for ICMP handling Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Andrew Lunn @ 2021-12-08 17:38 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: Hideaki YOSHIFUJI, David Ahern, Willem de Bruijn,
	James Prestwood, Justin Iurman, Praveen Chaudhary,
	Jason A . Donenfeld, Eric Dumazet, netdev, Andrew Lunn

When using SRv6 the destination IP address in the IPv6 header is not
always the true destination, it can be a router along the path that
SRv6 is using.

When ICMP reports an error, e.g, time exceeded, which is what
traceroute uses, it included the packet which invoked the error into
the ICMP message body. Upon receiving such an ICMP packet, the
invoking packet is examined and an attempt is made to find the socket
which sent the packet, so the error can be reported. Lookup is
performed using the source and destination address. If the
intermediary router IP address from the IP header is used, the lookup
fails. It is necessary to dig into the header and find the true
destination address in the Segment Router header, SRH.

v2:
Play games with the skb->network_header rather than clone the skb
v3:
Move helpers into seg6.c
v4:
Move short helper into header file.
Rework getting SRH destination address

Patch 1 exports a helper which can find the SRH in a packet
Patch 2 does the actual examination of the invoking packet
Patch 3 makes use of the results when trying to find the socket.

Andrew Lunn (3):
  seg6: export get_srh() for ICMP handling
  icmp: ICMPV6: Examine invoking packet for Segment Route Headers.
  udp6: Use Segment Routing Header for dest address if present

 include/linux/ipv6.h  |  2 ++
 include/net/seg6.h    |  1 +
 net/ipv6/icmp.c       | 36 +++++++++++++++++++++++++++++++++++-
 net/ipv6/seg6.c       | 29 +++++++++++++++++++++++++++++
 net/ipv6/seg6_local.c | 33 ++-------------------------------
 net/ipv6/udp.c        |  7 +++++++
 6 files changed, 76 insertions(+), 32 deletions(-)

-- 
2.33.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-12-08 22:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 17:38 [PATCH net-next v4 0/3] Fix traceroute in the presence of SRv6 Andrew Lunn
2021-12-08 17:38 ` [PATCH net-next v4 1/3] seg6: export get_srh() for ICMP handling Andrew Lunn
2021-12-08 17:38 ` Andrew Lunn
2021-12-08 21:24   ` Willem de Bruijn
2021-12-08 22:37     ` Andrew Lunn
2021-12-08 17:38 ` [PATCH net-next v4 3/3] udp6: Use Segment Routing Header for dest address if present Andrew Lunn
2021-12-08 21:26   ` Willem de Bruijn
2021-12-08 22:34     ` Andrew Lunn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.