diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2009-02-07 02:47:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-07 02:47:37 -0500 |
commit | d73f08011bc30c03a2bcb1ccd880e4be84aea269 (patch) | |
tree | a9f8c8ccff850775c43e541a803e26c85aea48ed /net/ipv6/ndisc.c | |
parent | 910d30b704542b49f83881a4832d8414c6c3d9c3 (diff) |
ipv6/ndisc: join error paths
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r-- | net/ipv6/ndisc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 3e2970841bd8..3cd83b85e9ef 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1538,13 +1538,10 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, | |||
1538 | if (rt->rt6i_flags & RTF_GATEWAY) { | 1538 | if (rt->rt6i_flags & RTF_GATEWAY) { |
1539 | ND_PRINTK2(KERN_WARNING | 1539 | ND_PRINTK2(KERN_WARNING |
1540 | "ICMPv6 Redirect: destination is not a neighbour.\n"); | 1540 | "ICMPv6 Redirect: destination is not a neighbour.\n"); |
1541 | dst_release(dst); | 1541 | goto release; |
1542 | return; | ||
1543 | } | ||
1544 | if (!xrlim_allow(dst, 1*HZ)) { | ||
1545 | dst_release(dst); | ||
1546 | return; | ||
1547 | } | 1542 | } |
1543 | if (!xrlim_allow(dst, 1*HZ)) | ||
1544 | goto release; | ||
1548 | 1545 | ||
1549 | if (dev->addr_len) { | 1546 | if (dev->addr_len) { |
1550 | read_lock_bh(&neigh->lock); | 1547 | read_lock_bh(&neigh->lock); |
@@ -1570,8 +1567,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, | |||
1570 | ND_PRINTK0(KERN_ERR | 1567 | ND_PRINTK0(KERN_ERR |
1571 | "ICMPv6 Redirect: %s() failed to allocate an skb.\n", | 1568 | "ICMPv6 Redirect: %s() failed to allocate an skb.\n", |
1572 | __func__); | 1569 | __func__); |
1573 | dst_release(dst); | 1570 | goto release; |
1574 | return; | ||
1575 | } | 1571 | } |
1576 | 1572 | ||
1577 | skb_reserve(buff, LL_RESERVED_SPACE(dev)); | 1573 | skb_reserve(buff, LL_RESERVED_SPACE(dev)); |
@@ -1631,6 +1627,10 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, | |||
1631 | 1627 | ||
1632 | if (likely(idev != NULL)) | 1628 | if (likely(idev != NULL)) |
1633 | in6_dev_put(idev); | 1629 | in6_dev_put(idev); |
1630 | return; | ||
1631 | |||
1632 | release: | ||
1633 | dst_release(dst); | ||
1634 | } | 1634 | } |
1635 | 1635 | ||
1636 | static void pndisc_redo(struct sk_buff *skb) | 1636 | static void pndisc_redo(struct sk_buff *skb) |