Skip to content

Commit

Permalink
ipv6: fix a bug in ndisc_send_redirect
Browse files Browse the repository at this point in the history
Release skb when transmit rate limit _not_ allow

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Li Wei authored and David S. Miller committed Nov 23, 2011
1 parent 02f1ce3 commit 4d65a24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/ndisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
}
if (!rt->rt6i_peer)
rt6_bind_peer(rt, 1);
if (inet_peer_xrlim_allow(rt->rt6i_peer, 1*HZ))
if (!inet_peer_xrlim_allow(rt->rt6i_peer, 1*HZ))
goto release;

if (dev->addr_len) {
Expand Down

0 comments on commit 4d65a24

Please sign in to comment.