diff options
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r-- | net/ipv6/ndisc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 54f62d3b8dd6..69a6330dea91 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1472,6 +1472,7 @@ void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target) | |||
1472 | struct net *net = dev_net(dev); | 1472 | struct net *net = dev_net(dev); |
1473 | struct sock *sk = net->ipv6.ndisc_sk; | 1473 | struct sock *sk = net->ipv6.ndisc_sk; |
1474 | int len = sizeof(struct icmp6hdr) + 2 * sizeof(struct in6_addr); | 1474 | int len = sizeof(struct icmp6hdr) + 2 * sizeof(struct in6_addr); |
1475 | struct inet_peer *peer; | ||
1475 | struct sk_buff *buff; | 1476 | struct sk_buff *buff; |
1476 | struct icmp6hdr *icmph; | 1477 | struct icmp6hdr *icmph; |
1477 | struct in6_addr saddr_buf; | 1478 | struct in6_addr saddr_buf; |
@@ -1518,9 +1519,8 @@ void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target) | |||
1518 | "Redirect: destination is not a neighbour\n"); | 1519 | "Redirect: destination is not a neighbour\n"); |
1519 | goto release; | 1520 | goto release; |
1520 | } | 1521 | } |
1521 | if (!rt->rt6i_peer) | 1522 | peer = rt6_get_peer_create(rt); |
1522 | rt6_bind_peer(rt, 1); | 1523 | if (!inet_peer_xrlim_allow(peer, 1*HZ)) |
1523 | if (!inet_peer_xrlim_allow(rt->rt6i_peer, 1*HZ)) | ||
1524 | goto release; | 1524 | goto release; |
1525 | 1525 | ||
1526 | if (dev->addr_len) { | 1526 | if (dev->addr_len) { |