]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ipv4: Convert fib_validate_source() to dscp_t.
authorGuillaume Nault <gnault@redhat.com>
Mon, 7 Oct 2024 18:25:02 +0000 (20:25 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 10 Oct 2024 00:31:40 +0000 (17:31 -0700)
commitd36236ab52754ef6bd083be945e9c2e93f466022
tree54ad4df8677ff330c0e7525d9cb249551f9a1ede
parentd32976408744a589f04b5c939f8f01f7167e5167
ipv4: Convert fib_validate_source() to dscp_t.

Pass a dscp_t variable to fib_validate_source(), instead of a plain u8,
to prevent accidental setting of ECN bits in ->flowi4_tos.

All callers of fib_validate_source() already have a dscp_t variable to
pass as parameter. We just need to remove the inet_dscp_to_dsfield()
conversions.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/08612a4519bc5a3578bb493fbaad82437ebb73dc.1728302212.git.gnault@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/ip_fib.h
net/ipv4/fib_frontend.c
net/ipv4/route.c