From: Guillaume Nault <gnault@redhat.com>
To: Ido Schimmel <idosch@nvidia.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, edumazet@google.com, dsahern@kernel.org
Subject: Re: [PATCH net] ipv4: Fix incorrect source address in Record Route option
Date: Thu, 18 Jul 2024 17:02:26 +0200 [thread overview]
Message-ID: <ZpkugkU/HQ4QUPfU@debian> (raw)
In-Reply-To: <20240718123407.434778-1-idosch@nvidia.com>
On Thu, Jul 18, 2024 at 03:34:07PM +0300, Ido Schimmel wrote:
> The Record Route IP option records the addresses of the routers that
> routed the packet. In the case of forwarded packets, the kernel performs
> a route lookup via fib_lookup() and fills in the preferred source
> address of the matched route.
>
> The lookup is performed with the DS field of the forwarded packet, but
> using the RT_TOS() macro which only masks one of the two ECN bits. If
> the packet is ECT(0) or CE, the matched route might be different than
> the route via which the packet was forwarded as the input path masks
> both of the ECN bits, resulting in the wrong address being filled in the
> Record Route option.
>
> Fix by masking both of the ECN bits.
Reviewed-by: Guillaume Nault <gnault@redhat.com>
next prev parent reply other threads:[~2024-07-18 15:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 12:34 [PATCH net] ipv4: Fix incorrect source address in Record Route option Ido Schimmel
2024-07-18 15:02 ` Guillaume Nault [this message]
2024-07-23 9:10 ` 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=ZpkugkU/HQ4QUPfU@debian \
--to=gnault@redhat.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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).