net: core: Dont send ARP probes for NUD_PERMANENET
Whenever a new neighbour is added with the state
NUD_PERMANENT, the ARP probing is removed since
it is not needed.
Change-Id: Id92b24d1b99b8deff91a8e105f7310efc2f21b39
Acked-by: Sneha Maganahalli <smaganah@qti.qualcomm.com>
Signed-off-by: Aman Gupta <amangupt@codeaurora.org>
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 2cfbe3f..f187917 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1286,9 +1286,10 @@ struct neighbour *neigh_event_ns(struct neigh_table *tbl,
lladdr || !dev->addr_len);
if (neigh) {
if (neigh_probe_enable) {
- if (!(neigh->nud_state == NUD_REACHABLE)) {
+ if (neigh->nud_state != NUD_REACHABLE &&
+ neigh->nud_state != NUD_PERMANENT) {
neigh_update(neigh, lladdr, NUD_STALE,
- NEIGH_UPDATE_F_OVERRIDE);
+ NEIGH_UPDATE_F_OVERRIDE);
write_lock(&neigh->lock);
neigh_probe(neigh);
neigh_update_notify(neigh);