neigh: Better handling of transition to NUD_PROBE state
[deliverable/linux.git] / net / core / neighbour.c
index 3de6542560288b3896ab243879a7b4a9b098ca0d..3a74df750af4044eba0e7d88ae01ca9b4dac0e72 100644 (file)
@@ -913,6 +913,7 @@ static void neigh_timer_handler(unsigned long arg)
                        neigh->nud_state = NUD_PROBE;
                        neigh->updated = jiffies;
                        atomic_set(&neigh->probes, 0);
+                       notify = 1;
                        next = now + NEIGH_VAR(neigh->parms, RETRANS_TIME);
                }
        } else {
@@ -1144,6 +1145,8 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
 
        if (new != old) {
                neigh_del_timer(neigh);
+               if (new & NUD_PROBE)
+                       atomic_set(&neigh->probes, 0);
                if (new & NUD_IN_TIMER)
                        neigh_add_timer(neigh, (jiffies +
                                                ((new & NUD_REACHABLE) ?
This page took 0.030793 seconds and 5 git commands to generate.