aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip.h
diff options
context:
space:
mode:
authorGuillaume Nault <gnault@redhat.com>2023-05-22 16:38:02 +0200
committerDavid S. Miller <davem@davemloft.net>2023-05-24 08:22:06 +0100
commitc85be08fc4fa44f07167be0377ebaa8d36b1dd58 (patch)
tree236709422c9ac32726f8819f85cf22226ef3e360 /include/net/ip.h
parent726de790f66029a7654b3e748f8d3e7888a30ae5 (diff)
downloadlinux-c85be08fc4fa44f07167be0377ebaa8d36b1dd58.tar.gz
raw: Stop using RTO_ONLINK.
Use ip_sendmsg_scope() 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. The MSG_DONTROUTE and SOCK_LOCALROUTE cases were already handled by raw_sendmsg() (SOCK_LOCALROUTE was handled by the RT_CONN_FLAGS*() macros called by get_rtconn_flags()). However, opt.is_strictroute wasn't taken into account. Therefore, a side effect of this patch is to now honour opt.is_strictroute, and thus align raw_sendmsg() with ping_v4_sendmsg() and udp_sendmsg(). Since raw_sendmsg() was the only user of get_rtconn_flags(), we can now remove this function. Signed-off-by: Guillaume Nault <gnault@redhat.com> Reviewed-by: David Ahern <dsahern@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r--include/net/ip.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index f1cb28d649e4b3..8a3860a916dc36 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -258,11 +258,6 @@ static inline __u8 get_rttos(struct ipcm_cookie* ipc, struct inet_sock *inet)
return (ipc->tos != -1) ? RT_TOS(ipc->tos) : RT_TOS(inet->tos);
}
-static inline __u8 get_rtconn_flags(struct ipcm_cookie* ipc, struct sock* sk)
-{
- return (ipc->tos != -1) ? RT_CONN_FLAGS_TOS(sk, ipc->tos) : RT_CONN_FLAGS(sk);
-}
-
/* datagram.c */
int __ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len);
int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len);