Skip to content

Commit 01f61cb

Browse files
Guillaume Naultklassert
authored andcommitted
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>
1 parent 766f532 commit 01f61cb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

net/xfrm/xfrm_policy.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2678,13 +2678,13 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy,
26782678
int header_len = 0;
26792679
int nfheader_len = 0;
26802680
int trailer_len = 0;
2681-
int tos;
26822681
int family = policy->selector.family;
26832682
xfrm_address_t saddr, daddr;
2683+
dscp_t dscp;
26842684

26852685
xfrm_flowi_addr_get(fl, &saddr, &daddr, family);
26862686

2687-
tos = inet_dscp_to_dsfield(xfrm_get_dscp(fl, family));
2687+
dscp = xfrm_get_dscp(fl, family);
26882688

26892689
dst_hold(dst);
26902690

@@ -2732,7 +2732,8 @@ static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy,
27322732
family = xfrm[i]->props.family;
27332733

27342734
oif = fl->flowi_oif ? : fl->flowi_l3mdev;
2735-
dst = xfrm_dst_lookup(xfrm[i], tos, oif,
2735+
dst = xfrm_dst_lookup(xfrm[i],
2736+
inet_dscp_to_dsfield(dscp), oif,
27362737
&saddr, &daddr, family, mark);
27372738
err = PTR_ERR(dst);
27382739
if (IS_ERR(dst))

0 commit comments

Comments
 (0)