From: Guillaume Nault <gnault@redhat.com>
To: David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>
Cc: netdev@vger.kernel.org, David Ahern <dsahern@kernel.org>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Subject: [PATCH net-next 0/3] ipv4: Remove RTO_ONLINK from udp, ping and raw sockets.
Date: Mon, 22 May 2023 16:37:50 +0200 [thread overview]
Message-ID: <cover.1684764727.git.gnault@redhat.com> (raw)
udp_sendmsg(), ping_v4_sendmsg() and raw_sendmsg() use similar patterns
for restricting their route lookup to on-link hosts. Although they use
slightly different code, they all use RTO_ONLINK to override the least
significant bit of their tos value.
RTO_ONLINK is used to restrict the route scope even when the scope is
set to RT_SCOPE_UNIVERSE. Therefore it isn't necessary: we can properly
set the scope to RT_SCOPE_LINK instead.
Removing RTO_ONLINK will allow to convert .flowi4_tos to dscp_t in the
future, thus allowing to properly separate the DSCP from the ECN bits
in the networking stack.
This patch series defines a common helper to figure out what's the
scope of the route lookup. This unifies the way udp, ping and raw
sockets get their routing scope and removes their dependency on
RTO_ONLINK.
Guillaume Nault (3):
ping: Stop using RTO_ONLINK.
raw: Stop using RTO_ONLINK.
udp: Stop using RTO_ONLINK.
include/net/ip.h | 16 ++++++++++++----
net/ipv4/ping.c | 15 +++++----------
net/ipv4/raw.c | 10 ++++------
net/ipv4/udp.c | 17 ++++++-----------
4 files changed, 27 insertions(+), 31 deletions(-)
--
2.39.2
next reply other threads:[~2023-05-22 14:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-22 14:37 Guillaume Nault [this message]
2023-05-22 14:37 ` [PATCH net-next 1/3] ping: Stop using RTO_ONLINK Guillaume Nault
2023-05-23 15:09 ` David Ahern
2023-05-22 14:38 ` [PATCH net-next 2/3] raw: " Guillaume Nault
2023-05-23 15:13 ` David Ahern
2023-05-22 14:38 ` [PATCH net-next 3/3] udp: " Guillaume Nault
2023-05-23 15:14 ` David Ahern
2023-05-24 7:30 ` [PATCH net-next 0/3] ipv4: Remove RTO_ONLINK from udp, ping and raw sockets 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=cover.1684764727.git.gnault@redhat.com \
--to=gnault@redhat.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemdebruijn.kernel@gmail.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).