All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guillaume Nault <gnault@redhat.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org,
	Steffen Klassert <steffen.klassert@secunet.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	David Ahern <dsahern@kernel.org>, wenxu <wenxu@ucloud.cn>,
	Varun Prakash <varun@chelsio.com>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>,
	Vlad Buslov <vladbu@nvidia.com>,
	Or Gerlitz <ogerlitz@mellanox.com>
Subject: Re: [PATCH net 0/4] ipv4: Fix accidental RTO_ONLINK flags passed to ip_route_output_key_hash()
Date: Mon, 10 Jan 2022 14:59:38 +0100	[thread overview]
Message-ID: <20220110135938.GA3425@pc-4.home> (raw)
In-Reply-To: <20220109162322.4fc665bc@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>

On Sun, Jan 09, 2022 at 04:23:22PM -0800, Jakub Kicinski wrote:
> On Wed, 5 Jan 2022 20:56:16 +0100 Guillaume Nault wrote:
> > The IPv4 stack generally uses the last bit of ->flowi4_tos as a flag
> > indicating link scope for route lookups (RTO_ONLINK). Therefore, we
> > have to be careful when copying a TOS value to ->flowi4_tos. In
> > particular, the ->tos field of IPv4 packets may have this bit set
> > because of ECN. Also tunnel keys generally accept any user value for
> > the tos.
> > 
> > This series fixes several places where ->flowi4_tos was set from
> > non-sanitised values and the flowi4 structure was later used by
> > ip_route_output_key_hash().
> > 
> > Note that the IPv4 stack usually clears the RTO_ONLINK bit using
> > RT_TOS(). However this macro is based on an obsolete interpretation of
> > the old IPv4 TOS field (RFC 1349) and clears the three high order bits.
> > Since we don't need to clear these bits and since it doesn't make sense
> > to clear only one of the ECN bits, this patch series uses INET_ECN_MASK
> > instead.
> > 
> > All patches were compile tested only.
> 
> Does not apply cleanly to net any more, could you respin?

Yes, done:
  https://lore.kernel.org/netdev/cover.1641821242.git.gnault@redhat.com/


      reply	other threads:[~2022-01-10 13:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 19:56 [PATCH net 0/4] ipv4: Fix accidental RTO_ONLINK flags passed to ip_route_output_key_hash() Guillaume Nault
2022-01-05 19:56 ` [PATCH net 1/4] xfrm: Don't accidentally set RTO_ONLINK in decode_session4() Guillaume Nault
2022-01-05 19:56 ` [PATCH net 2/4] gre: Don't accidentally set RTO_ONLINK in gre_fill_metadata_dst() Guillaume Nault
2022-01-05 19:56 ` [PATCH net 3/4] libcxgb: Don't accidentally set RTO_ONLINK in cxgb_find_route() Guillaume Nault
2022-01-05 19:56 ` [PATCH net 4/4] mlx5: Don't accidentally set RTO_ONLINK before mlx5e_route_lookup_ipv4_get() Guillaume Nault
2022-01-06  3:57   ` Saeed Mahameed
2022-01-06 11:47     ` Guillaume Nault
2022-01-10  0:23 ` [PATCH net 0/4] ipv4: Fix accidental RTO_ONLINK flags passed to ip_route_output_key_hash() Jakub Kicinski
2022-01-10 13:59   ` Guillaume Nault [this message]

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=20220110135938.GA3425@pc-4.home \
    --to=gnault@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=saeedm@nvidia.com \
    --cc=steffen.klassert@secunet.com \
    --cc=varun@chelsio.com \
    --cc=vladbu@nvidia.com \
    --cc=wenxu@ucloud.cn \
    --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 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.