OSDN Git Service

ping: Stop using RTO_ONLINK.
authorGuillaume Nault <gnault@redhat.com>
Mon, 22 May 2023 14:37:57 +0000 (16:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 May 2023 07:22:06 +0000 (08:22 +0100)
commit726de790f66029a7654b3e748f8d3e7888a30ae5
tree14046deecb8d8f6b2a4a06e0bd6c458f2a1510d2
parenta695641c8eaac268ad7e373c7e33c00b88b2bcbf
ping: Stop using RTO_ONLINK.

Define a new helper to figure out the correct route scope to use on TX,
depending on socket configuration, ancillary data and send flags.

Use this new helper to properly initialise the scope in
flowi4_init_output(), instead of overriding tos with the RTO_ONLINK
flag.

The objective is to eventually remove RTO_ONLINK, which will allow
converting .flowi4_tos to dscp_t.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip.h
net/ipv4/ping.c