aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_policy.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
-rw-r--r--net/xfrm/xfrm_policy.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 2b0a80b6259b..7c7bb54f2265 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1187,7 +1187,7 @@ int __xfrm_sk_clone_policy(struct sock *sk)
1187} 1187}
1188 1188
1189static int 1189static int
1190xfrm_get_saddr(xfrm_address_t *local, xfrm_address_t *remote, 1190xfrm_get_saddr(struct net *net, xfrm_address_t *local, xfrm_address_t *remote,
1191 unsigned short family) 1191 unsigned short family)
1192{ 1192{
1193 int err; 1193 int err;
@@ -1195,7 +1195,7 @@ xfrm_get_saddr(xfrm_address_t *local, xfrm_address_t *remote,
1195 1195
1196 if (unlikely(afinfo == NULL)) 1196 if (unlikely(afinfo == NULL))
1197 return -EINVAL; 1197 return -EINVAL;
1198 err = afinfo->get_saddr(local, remote); 1198 err = afinfo->get_saddr(net, local, remote);
1199 xfrm_policy_put_afinfo(afinfo); 1199 xfrm_policy_put_afinfo(afinfo);
1200 return err; 1200 return err;
1201} 1201}
@@ -1207,6 +1207,7 @@ xfrm_tmpl_resolve_one(struct xfrm_policy *policy, struct flowi *fl,
1207 struct xfrm_state **xfrm, 1207 struct xfrm_state **xfrm,
1208 unsigned short family) 1208 unsigned short family)
1209{ 1209{
1210 struct net *net = xp_net(policy);
1210 int nx; 1211 int nx;
1211 int i, error; 1212 int i, error;
1212 xfrm_address_t *daddr = xfrm_flowi_daddr(fl, family); 1213 xfrm_address_t *daddr = xfrm_flowi_daddr(fl, family);
@@ -1225,7 +1226,7 @@ xfrm_tmpl_resolve_one(struct xfrm_policy *policy, struct flowi *fl,
1225 local = &tmpl->saddr; 1226 local = &tmpl->saddr;
1226 family = tmpl->encap_family; 1227 family = tmpl->encap_family;
1227 if (xfrm_addr_any(local, family)) { 1228 if (xfrm_addr_any(local, family)) {
1228 error = xfrm_get_saddr(&tmp, remote, family); 1229 error = xfrm_get_saddr(net, &tmp, remote, family);
1229 if (error) 1230 if (error)
1230 goto fail; 1231 goto fail;
1231 local = &tmp; 1232 local = &tmp;