|
@@ -1180,6 +1180,12 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
|
|
lladdr = neigh->ha;
|
|
lladdr = neigh->ha;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* Update confirmed timestamp for neighbour entry after we
|
|
|
|
+ * received ARP packet even if it doesn't change IP to MAC binding.
|
|
|
|
+ */
|
|
|
|
+ if (new & NUD_CONNECTED)
|
|
|
|
+ neigh->confirmed = jiffies;
|
|
|
|
+
|
|
/* If entry was valid and address is not changed,
|
|
/* If entry was valid and address is not changed,
|
|
do not change entry state, if new one is STALE.
|
|
do not change entry state, if new one is STALE.
|
|
*/
|
|
*/
|
|
@@ -1201,15 +1207,12 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- /* Update timestamps only once we know we will make a change to the
|
|
|
|
|
|
+ /* Update timestamp only once we know we will make a change to the
|
|
* neighbour entry. Otherwise we risk to move the locktime window with
|
|
* neighbour entry. Otherwise we risk to move the locktime window with
|
|
* noop updates and ignore relevant ARP updates.
|
|
* noop updates and ignore relevant ARP updates.
|
|
*/
|
|
*/
|
|
- if (new != old || lladdr != neigh->ha) {
|
|
|
|
- if (new & NUD_CONNECTED)
|
|
|
|
- neigh->confirmed = jiffies;
|
|
|
|
|
|
+ if (new != old || lladdr != neigh->ha)
|
|
neigh->updated = jiffies;
|
|
neigh->updated = jiffies;
|
|
- }
|
|
|
|
|
|
|
|
if (new != old) {
|
|
if (new != old) {
|
|
neigh_del_timer(neigh);
|
|
neigh_del_timer(neigh);
|