From f340d369af106e55733b81ad0a8aa9e2f7a5030d Mon Sep 17 00:00:00 2001 From: Sridhar Ancha Date: Thu, 14 Apr 2016 21:20:43 +0530 Subject: [PATCH] net: core: To send ARP probe when neighbor state is NUD_STALE Featurizing to send an ARP probe to the connected client when the neighbor state moves to NUD_STALE. This triggers the neighbor state to move back to NUD_REACHABLE if the ARP request is resolved and prevents a RTM_DELNEIGH from being triggered Change-Id: I27aba004a180dfbff5b1fcee2d04047c8523fb8a Signed-off-by: Sridhar Ancha --- net/core/neighbour.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/core/neighbour.c b/net/core/neighbour.c index dbd9172f211..b678920f4b9 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -951,7 +951,11 @@ static void neigh_timer_handler(unsigned long arg) if (!mod_timer(&neigh->timer, next)) neigh_hold(neigh); } - if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE | NUD_STALE)) { + + if (neigh_probe_enable) { + if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE | NUD_STALE)) + neigh_probe(neigh); + } else if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE)) { neigh_probe(neigh); } else { out: -- 2.20.1