aboutsummaryrefslogtreecommitdiff
path: root/net/netfilter
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-02 13:27:41 -0800
committerDavid S. Miller <davem@davemloft.net>2011-03-02 13:27:41 -0800
commit452edd598f60522c11f7f88fdbab27eb36509d1a (patch)
treedf1510e9848e591a412c8bfa724253470c48c4c2 /net/netfilter
parent3872b284087081ee5cb0e4630954c2f7a2153cf5 (diff)
xfrm: Return dst directly from xfrm_lookup()
Instead of on the stack. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/ipvs/ip_vs_xmit.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
index a48239aba33..6264219f0a4 100644
--- a/net/netfilter/ipvs/ip_vs_xmit.c
+++ b/net/netfilter/ipvs/ip_vs_xmit.c
@@ -218,8 +218,13 @@ __ip_vs_route_output_v6(struct net *net, struct in6_addr *daddr,
ipv6_dev_get_saddr(net, ip6_dst_idev(dst)->dev,
&fl.fl6_dst, 0, &fl.fl6_src) < 0)
goto out_err;
- if (do_xfrm && xfrm_lookup(net, &dst, &fl, NULL, 0) < 0)
- goto out_err;
+ if (do_xfrm) {
+ dst = xfrm_lookup(net, dst, &fl, NULL, 0);
+ if (IS_ERR(dst)) {
+ dst = NULL;
+ goto out_err;
+ }
+ }
ipv6_addr_copy(ret_saddr, &fl.fl6_src);
return dst;