]> www.infradead.org Git - users/dwmw2/linux.git/commit
ipv4: remove get_rttos
authorWillem de Bruijn <willemb@google.com>
Fri, 14 Feb 2025 22:27:01 +0000 (17:27 -0500)
committerJakub Kicinski <kuba@kernel.org>
Wed, 19 Feb 2025 02:27:19 +0000 (18:27 -0800)
commit9329b58395e51bba9c847419cc4ba176df3dd2b7
tree56c4494fdefca33e1f627224b1adc13d47297a52
parent94788792f37902f1f4d417f6f9663831cf7e91fc
ipv4: remove get_rttos

Initialize the ip cookie tos field when initializing the cookie, in
ipcm_init_sk.

The existing code inverts the standard pattern for initializing cookie
fields. Default is to initialize the field from the sk, then possibly
overwrite that when parsing cmsgs (the unlikely case).

This field inverts that, setting the field to an illegal value and
after cmsg parsing checking whether the value is still illegal and
thus should be overridden.

Be careful to always apply mask INET_DSCP_MASK, as before.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20250214222720.3205500-5-willemdebruijn.kernel@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/ip.h
net/ipv4/ping.c
net/ipv4/raw.c
net/ipv4/udp.c