ipv4: Remove RTO_ONLINK from udp, ping and raw sockets.
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | ping: Stop using RTO_ONLINK.include/ net/ | +18 | 1 reply | Applied |
| 2/3 | raw: Stop using RTO_ONLINK.include/ net/ | +4 | 1 reply | Applied |
| 3/3 | udp: Stop using RTO_ONLINK.net/ | +6 | 1 reply | Applied |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | David Ahern |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next 0/3] ipv4: Remove RTO_ONLINK from udp, ping and raw sockets.
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(-)
Signature · 1 line
2.39.2