diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-10-12 05:30:16 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-10-12 05:30:16 -0700 |
| commit | bbaf766c22fc4745fbf4494037a62a21ad7c5ecc (patch) | |
| tree | a0cac8263692d7aba4fad5feae5ad4ab195bdd95 /net/core | |
| parent | 51abefff9fb42c8834acb643d6aa70d855e0cf43 (diff) | |
| parent | 1065e41df3d0060f67ea0b2432b252dc9acca341 (diff) | |
Merge "Merge android-4.4.159 (624c095) into msm-4.4"
Diffstat (limited to 'net/core')
| -rw-r--r-- | net/core/neighbour.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 642b13ddd69c..fef2043cdb1d 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -1140,6 +1140,12 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, 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, do not change entry state, if new one is STALE. */ @@ -1163,15 +1169,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 * 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; - } if (new != old) { neigh_del_timer(neigh); |
