diff options
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r-- | net/core/neighbour.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 58b0bcc125b5..d274f81fcc2c 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1132,10 +1132,6 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, | |||
1132 | lladdr = neigh->ha; | 1132 | lladdr = neigh->ha; |
1133 | } | 1133 | } |
1134 | 1134 | ||
1135 | if (new & NUD_CONNECTED) | ||
1136 | neigh->confirmed = jiffies; | ||
1137 | neigh->updated = jiffies; | ||
1138 | |||
1139 | /* If entry was valid and address is not changed, | 1135 | /* If entry was valid and address is not changed, |
1140 | do not change entry state, if new one is STALE. | 1136 | do not change entry state, if new one is STALE. |
1141 | */ | 1137 | */ |
@@ -1157,6 +1153,16 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, | |||
1157 | } | 1153 | } |
1158 | } | 1154 | } |
1159 | 1155 | ||
1156 | /* Update timestamps only once we know we will make a change to the | ||
1157 | * neighbour entry. Otherwise we risk to move the locktime window with | ||
1158 | * noop updates and ignore relevant ARP updates. | ||
1159 | */ | ||
1160 | if (new != old || lladdr != neigh->ha) { | ||
1161 | if (new & NUD_CONNECTED) | ||
1162 | neigh->confirmed = jiffies; | ||
1163 | neigh->updated = jiffies; | ||
1164 | } | ||
1165 | |||
1160 | if (new != old) { | 1166 | if (new != old) { |
1161 | neigh_del_timer(neigh); | 1167 | neigh_del_timer(neigh); |
1162 | if (new & NUD_PROBE) | 1168 | if (new & NUD_PROBE) |