]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ipv4: Prepare inet_rtm_getroute() to .flowi4_tos conversion.
authorGuillaume Nault <gnault@redhat.com>
Wed, 15 Jan 2025 12:44:52 +0000 (13:44 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 17 Jan 2025 00:52:29 +0000 (16:52 -0800)
commit65a55aa7e64eefcd2a7f530a0bf8d21d20bffd37
tree4a04ebe1f77fa28690f88330efa319923839ecb4
parent2c77bcb344f589054b2039bddcd32c4f666258b9
ipv4: Prepare inet_rtm_getroute() to .flowi4_tos conversion.

Store rtm->rtm_tos in a dscp_t variable, which can then be used for
setting fl4.flowi4_tos and also be passed as parameter of
ip_route_input_rcu().

The .flowi4_tos field is going to be converted to dscp_t to ensure ECN
bits aren't erroneously taken into account during route lookups. Having
a dscp_t variable available will simplify that conversion, as we'll
just have to drop the inet_dscp_to_dsfield() call.

Note that we can't just convert rtm->rtm_tos to dscp_t because this
structure is exported to user space.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/7bc1c7dc47ad1393569095d334521fae59af5bc7.1736944951.git.gnault@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/route.c