From: David Ahern <dsahern@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>, David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
David Ahern <dsahern@kernel.org>,
Willem de Bruijn <willemb@google.com>,
James Prestwood <prestwoj@gmail.com>,
Justin Iurman <justin.iurman@uliege.be>,
Praveen Chaudhary <praveen5582@gmail.com>,
"Jason A . Donenfeld" <Jason@zx2c4.com>,
Eric Dumazet <edumazet@google.com>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH v5 net-next 2/3] icmp: ICMPV6: Examine invoking packet for Segment Route Headers.
Date: Mon, 3 Jan 2022 10:34:37 -0700 [thread overview]
Message-ID: <c67d22c7-2f1b-b619-b14e-2f5076b92a15@gmail.com> (raw)
In-Reply-To: <20220103171132.93456-3-andrew@lunn.ch>
On 1/3/22 10:11 AM, Andrew Lunn wrote:
> RFC8754 says:
>
> ICMP error packets generated within the SR domain are sent to source
> nodes within the SR domain. The invoking packet in the ICMP error
> message may contain an SRH. Since the destination address of a packet
> with an SRH changes as each segment is processed, it may not be the
> destination used by the socket or application that generated the
> invoking packet.
>
> For the source of an invoking packet to process the ICMP error
> message, the ultimate destination address of the IPv6 header may be
> required. The following logic is used to determine the destination
> address for use by protocol-error handlers.
>
> * Walk all extension headers of the invoking IPv6 packet to the
> routing extension header preceding the upper-layer header.
>
> - If routing header is type 4 Segment Routing Header (SRH)
>
> o The SID at Segment List[0] may be used as the destination
> address of the invoking packet.
>
> Mangle the skb so the network header points to the invoking packet
> inside the ICMP packet. The seg6 helpers can then be used on the skb
> to find any segment routing headers. If found, mark this fact in the
> IPv6 control block of the skb, and store the offset into the packet of
> the SRH. Then restore the skb back to its old state.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---
> include/linux/ipv6.h | 2 ++
> include/net/seg6.h | 1 +
> net/ipv6/icmp.c | 6 +++++-
> net/ipv6/seg6.c | 30 ++++++++++++++++++++++++++++++
> 4 files changed, 38 insertions(+), 1 deletion(-)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
next prev parent reply other threads:[~2022-01-03 17:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-03 17:11 [PATCH v5 net-next 0/3] Fix traceroute in the presence of SRv6 Andrew Lunn
2022-01-03 17:11 ` [PATCH v5 net-next 1/3] seg6: export get_srh() for ICMP handling Andrew Lunn
2022-01-03 17:31 ` David Ahern
2022-01-03 20:52 ` Willem de Bruijn
2022-01-03 17:11 ` [PATCH v5 net-next 2/3] icmp: ICMPV6: Examine invoking packet for Segment Route Headers Andrew Lunn
2022-01-03 17:34 ` David Ahern [this message]
2022-01-03 20:55 ` Willem de Bruijn
2022-01-03 17:11 ` [PATCH v5 net-next 3/3] udp6: Use Segment Routing Header for dest address if present Andrew Lunn
2022-01-03 17:35 ` David Ahern
2022-01-03 20:55 ` Willem de Bruijn
2022-01-04 12:40 ` [PATCH v5 net-next 0/3] Fix traceroute in the presence of SRv6 patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c67d22c7-2f1b-b619-b14e-2f5076b92a15@gmail.com \
--to=dsahern@gmail.com \
--cc=Jason@zx2c4.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=justin.iurman@uliege.be \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=praveen5582@gmail.com \
--cc=prestwoj@gmail.com \
--cc=willemb@google.com \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).