mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
xfrm: Return dst directly from xfrm_lookup()
Instead of on the stack. Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
3872b28408
commit
452edd598f
14 changed files with 111 additions and 89 deletions
|
|
@ -1222,7 +1222,11 @@ static int dn_route_output_key(struct dst_entry **pprt, struct flowi *flp, int f
|
|||
|
||||
err = __dn_route_output_key(pprt, flp, flags);
|
||||
if (err == 0 && flp->proto) {
|
||||
err = xfrm_lookup(&init_net, pprt, flp, NULL, 0);
|
||||
*pprt = xfrm_lookup(&init_net, *pprt, flp, NULL, 0);
|
||||
if (IS_ERR(*pprt)) {
|
||||
err = PTR_ERR(*pprt);
|
||||
*pprt = NULL;
|
||||
}
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
|
@ -1235,7 +1239,11 @@ int dn_route_output_sock(struct dst_entry **pprt, struct flowi *fl, struct sock
|
|||
if (err == 0 && fl->proto) {
|
||||
if (!(flags & MSG_DONTWAIT))
|
||||
fl->flags |= FLOWI_FLAG_CAN_SLEEP;
|
||||
err = xfrm_lookup(&init_net, pprt, fl, sk, 0);
|
||||
*pprt = xfrm_lookup(&init_net, *pprt, fl, sk, 0);
|
||||
if (IS_ERR(*pprt)) {
|
||||
err = PTR_ERR(*pprt);
|
||||
*pprt = NULL;
|
||||
}
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue