neigh: set nud_state to NUD_INCOMPLETE when probing router reachability
authorDuan Jiong <duanj.fnst@cn.fujitsu.com>
Fri, 9 May 2014 05:16:48 +0000 (13:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 May 2014 20:20:37 +0000 (13:20 -0700)
commitc712c1f79c8e074cb4568231c3b034519896108d
treed2a5e79b0cb732e1722cac9679f368589201672d
parenta3db451d65cb1b0195ebf19798811963b30173ea
neigh: set nud_state to NUD_INCOMPLETE when probing router reachability

[ Upstream commit 2176d5d41891753774f648b67470398a5acab584 ]

Since commit 7e98056964("ipv6: router reachability probing"), a router falls
into NUD_FAILED will be probed.

Now if function rt6_select() selects a router which neighbour state is NUD_FAILED,
and at the same time function rt6_probe() changes the neighbour state to NUD_PROBE,
then function dst_neigh_output() can directly send packets, but actually the
neighbour still is unreachable. If we set nud_state to NUD_INCOMPLETE instead
NUD_PROBE, packets will not be sent out until the neihbour is reachable.

In addition, because the route should be probes with a single NS, so we must
set neigh->probes to neigh_max_probes(), then the neigh timer timeout and function
neigh_timer_handler() will not send other NS Messages.

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/neighbour.c