summaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index e24e4cf2a112..63d37004ee66 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2730,7 +2730,12 @@ int ip_route_output_flow(struct net *net, struct rtable **rp, struct flowi *flp,
flp->fl4_src = (*rp)->rt_src;
if (!flp->fl4_dst)
flp->fl4_dst = (*rp)->rt_dst;
- return xfrm_lookup(net, (struct dst_entry **)rp, flp, sk, 0);
+ *rp = (struct rtable *) xfrm_lookup(net, &(*rp)->dst, flp, sk, 0);
+ if (IS_ERR(*rp)) {
+ err = PTR_ERR(*rp);
+ *rp = NULL;
+ return err;
+ }
}
return 0;
OpenPOWER on IntegriCloud