diff options
author | Guillaume Nault <gnault@redhat.com> | 2024-10-31 16:52:43 +0100 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2024-11-06 12:42:34 +0100 |
commit | 01f61cbfc8b2cf89fe960ea3c1c67bba089dbdc5 (patch) | |
tree | 8aa124e1edb9af288c0e380822e600d3da9b62fd | |
parent | xfrm: Convert xfrm_get_tos() to dscp_t. (diff) | |
download | linux-01f61cbfc8b2cf89fe960ea3c1c67bba089dbdc5.tar.xz linux-01f61cbfc8b2cf89fe960ea3c1c67bba089dbdc5.zip |
xfrm: Convert xfrm_bundle_create() to dscp_t.
Use a dscp_t variable to store the result of xfrm_get_dscp().
This prepares for the future conversion of xfrm_dst_lookup().
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
-rw-r--r-- | net/xfrm/xfrm_policy.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 51a071a79016..ecb989347bd4 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -2678,13 +2678,13 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy, int header_len = 0; int nfheader_len = 0; int trailer_len = 0; - int tos; int family = policy->selector.family; xfrm_address_t saddr, daddr; + dscp_t dscp; xfrm_flowi_addr_get(fl, &saddr, &daddr, family); - tos = inet_dscp_to_dsfield(xfrm_get_dscp(fl, family)); + dscp = xfrm_get_dscp(fl, family); dst_hold(dst); @@ -2732,7 +2732,8 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy, family = xfrm[i]->props.family; oif = fl->flowi_oif ? : fl->flowi_l3mdev; - dst = xfrm_dst_lookup(xfrm[i], tos, oif, + dst = xfrm_dst_lookup(xfrm[i], + inet_dscp_to_dsfield(dscp), oif, &saddr, &daddr, family, mark); err = PTR_ERR(dst); if (IS_ERR(dst)) |