aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/mcast.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-02 16:27:41 -0500
committerDavid S. Miller <davem@davemloft.net>2011-03-02 16:27:41 -0500
commit452edd598f60522c11f7f88fdbab27eb36509d1a (patch)
treedf1510e9848e591a412c8bfa724253470c48c4c2 /net/ipv6/mcast.c
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/ipv6/mcast.c')
-rw-r--r--net/ipv6/mcast.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 49f986d626a0..7b27d08ee281 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -1429,7 +1429,12 @@ static void mld_sendpack(struct sk_buff *skb)
1429 &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr, 1429 &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr,
1430 skb->dev->ifindex); 1430 skb->dev->ifindex);
1431 1431
1432 err = xfrm_lookup(net, &dst, &fl, NULL, 0); 1432 dst = xfrm_lookup(net, dst, &fl, NULL, 0);
1433 err = 0;
1434 if (IS_ERR(dst)) {
1435 err = PTR_ERR(dst);
1436 dst = NULL;
1437 }
1433 skb_dst_set(skb, dst); 1438 skb_dst_set(skb, dst);
1434 if (err) 1439 if (err)
1435 goto err_out; 1440 goto err_out;
@@ -1796,9 +1801,11 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type)
1796 &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr, 1801 &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr,
1797 skb->dev->ifindex); 1802 skb->dev->ifindex);
1798 1803
1799 err = xfrm_lookup(net, &dst, &fl, NULL, 0); 1804 dst = xfrm_lookup(net, dst, &fl, NULL, 0);
1800 if (err) 1805 if (IS_ERR(dst)) {
1806 err = PTR_ERR(dst);
1801 goto err_out; 1807 goto err_out;
1808 }
1802 1809
1803 skb_dst_set(skb, dst); 1810 skb_dst_set(skb, dst);
1804 err = NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_OUT, skb, NULL, skb->dev, 1811 err = NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_OUT, skb, NULL, skb->dev,