aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Nault <[email protected]>2024-10-31 16:52:36 +0100
committerSteffen Klassert <[email protected]>2024-11-06 12:42:16 +0100
commit766f532089afd202a537f44c09a88ab9912f07d7 (patch)
treef75f246d40a1d75305ca112656b14a29ed60be34
parent83dfce38c49f3242c7edf5baab5c79c9ec360ecc (diff)
xfrm: Convert xfrm_get_tos() to dscp_t.
Return a dscp_t variable to prepare for the future conversion of xfrm_bundle_create() to dscp_t. While there, rename the function "xfrm_get_dscp", to align its name with the new return type. Signed-off-by: Guillaume Nault <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
-rw-r--r--net/xfrm/xfrm_policy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 8a1b83191a6c..51a071a79016 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -2587,10 +2587,10 @@ xfrm_tmpl_resolve(struct xfrm_policy **pols, int npols, const struct flowi *fl,
}
-static int xfrm_get_tos(const struct flowi *fl, int family)
+static dscp_t xfrm_get_dscp(const struct flowi *fl, int family)
{
if (family == AF_INET)
- return fl->u.ip4.flowi4_tos & INET_DSCP_MASK;
+ return inet_dsfield_to_dscp(fl->u.ip4.flowi4_tos);
return 0;
}
@@ -2684,7 +2684,7 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy,
xfrm_flowi_addr_get(fl, &saddr, &daddr, family);
- tos = xfrm_get_tos(fl, family);
+ tos = inet_dscp_to_dsfield(xfrm_get_dscp(fl, family));
dst_hold(dst);