diff options
author | David S. Miller <davem@davemloft.net> | 2011-12-06 17:04:13 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-06 17:04:13 -0500 |
commit | 87a115783eca7a424eef599d6f10a499f85f59c8 (patch) | |
tree | 4b80b4d2ea9a61253f89570f63da1ab9a356dfa4 /net/ipv6/ndisc.c | |
parent | 8f0315190dec88bf035d50e4fd1db89859b414f6 (diff) |
ipv6: Move xfrm_lookup() call down into icmp6_dst_alloc().
And return error pointers.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r-- | net/ipv6/ndisc.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index e72c8af85781..f3e50c29add4 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -516,14 +516,7 @@ void ndisc_send_skb(struct sk_buff *skb, | |||
516 | type = icmp6h->icmp6_type; | 516 | type = icmp6h->icmp6_type; |
517 | 517 | ||
518 | icmpv6_flow_init(sk, &fl6, type, saddr, daddr, dev->ifindex); | 518 | icmpv6_flow_init(sk, &fl6, type, saddr, daddr, dev->ifindex); |
519 | 519 | dst = icmp6_dst_alloc(dev, neigh, &fl6); | |
520 | dst = icmp6_dst_alloc(dev, neigh, daddr); | ||
521 | if (!dst) { | ||
522 | kfree_skb(skb); | ||
523 | return; | ||
524 | } | ||
525 | |||
526 | dst = xfrm_lookup(net, dst, flowi6_to_flowi(&fl6), NULL, 0); | ||
527 | if (IS_ERR(dst)) { | 520 | if (IS_ERR(dst)) { |
528 | kfree_skb(skb); | 521 | kfree_skb(skb); |
529 | return; | 522 | return; |