BACKPORT: neigh: probe application via netlink in NUD_PROBE

iproute2 arpd seems to expect this as there's code and comments
to handle netlink probes with NUD_PROBE set. It is used to flush
the arpd cached mappings.

opennhrp instead turns off unicast probes (so it can handle all
neighbour discovery). Without this change it will not see NUD_PROBE
probes and cannot reconfirm the mapping. Thus currently neigh entry
will just fail and can cause few packets dropped until broadcast
discovery is restarted.

Earlier discussion on the subject:
http://marc.info/?t=139305877100001&r=1&w=2

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Timo Teräs 2014-02-26 11:43:04 +02:00 committed by syphyr
parent e1f4fb3251
commit 2e166816b8
1 changed files with 4 additions and 3 deletions

View File

@ -843,9 +843,10 @@ out:
static __inline__ int neigh_max_probes(struct neighbour *n)
{
struct neigh_parms *p = n->parms;
return (n->nud_state & NUD_PROBE) ?
p->ucast_probes :
p->ucast_probes + p->app_probes + p->mcast_probes;
int max_probes = p->ucast_probes + p->app_probes;
if (!(n->nud_state & NUD_PROBE))
max_probes += p->mcast_probes;
return max_probes;
}
static void neigh_invalidate(struct neighbour *neigh)