diff options
author | Guillaume Nault <gnault@redhat.com> | 2024-10-31 16:52:57 +0100 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2024-11-06 12:42:51 +0100 |
commit | e57dfaa4b0a72f6a231a8eedb95d260045bbd8db (patch) | |
tree | 4511b8a0b1313ccd31c7a9a730b45556d317ebdb /net/ipv4 | |
parent | 3021a2a3403df0fe0b79af15071e5f6ee25461a4 (diff) | |
download | lwn-e57dfaa4b0a72f6a231a8eedb95d260045bbd8db.tar.gz lwn-e57dfaa4b0a72f6a231a8eedb95d260045bbd8db.zip |
xfrm: Convert struct xfrm_dst_lookup_params -> tos to dscp_t.
Add type annotation to the "tos" field of struct xfrm_dst_lookup_params,
to ensure that the ECN bits aren't mistakenly taken into account when
doing route lookups. Rename that field (tos -> dscp) to make that
change explicit.
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/xfrm4_policy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index 7e1c2faed1ff..7fb6205619e7 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c @@ -14,6 +14,7 @@ #include <linux/inetdevice.h> #include <net/dst.h> #include <net/xfrm.h> +#include <net/inet_dscp.h> #include <net/ip.h> #include <net/l3mdev.h> @@ -24,7 +25,7 @@ static struct dst_entry *__xfrm4_dst_lookup(struct flowi4 *fl4, memset(fl4, 0, sizeof(*fl4)); fl4->daddr = params->daddr->a4; - fl4->flowi4_tos = params->tos; + fl4->flowi4_tos = inet_dscp_to_dsfield(params->dscp); fl4->flowi4_l3mdev = l3mdev_master_ifindex_by_index(params->net, params->oif); fl4->flowi4_mark = params->mark; |