diff options
Diffstat (limited to 'net/core/neighbour.c')
-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 aa19d86937af..91592fceeaad 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1180,6 +1180,12 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, | |||
1180 | lladdr = neigh->ha; | 1180 | lladdr = neigh->ha; |
1181 | } | 1181 | } |
1182 | 1182 | ||
1183 | /* Update confirmed timestamp for neighbour entry after we | ||
1184 | * received ARP packet even if it doesn't change IP to MAC binding. | ||
1185 | */ | ||
1186 | if (new & NUD_CONNECTED) | ||
1187 | neigh->confirmed = jiffies; | ||
1188 | |||
1183 | /* If entry was valid and address is not changed, | 1189 | /* If entry was valid and address is not changed, |
1184 | do not change entry state, if new one is STALE. | 1190 | do not change entry state, if new one is STALE. |
1185 | */ | 1191 | */ |
@@ -1201,15 +1207,12 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, | |||
1201 | } | 1207 | } |
1202 | } | 1208 | } |
1203 | 1209 | ||
1204 | /* Update timestamps only once we know we will make a change to the | 1210 | /* Update timestamp only once we know we will make a change to the |
1205 | * neighbour entry. Otherwise we risk to move the locktime window with | 1211 | * neighbour entry. Otherwise we risk to move the locktime window with |
1206 | * noop updates and ignore relevant ARP updates. | 1212 | * noop updates and ignore relevant ARP updates. |
1207 | */ | 1213 | */ |
1208 | if (new != old || lladdr != neigh->ha) { | 1214 | if (new != old || lladdr != neigh->ha) |
1209 | if (new & NUD_CONNECTED) | ||
1210 | neigh->confirmed = jiffies; | ||
1211 | neigh->updated = jiffies; | 1215 | neigh->updated = jiffies; |
1212 | } | ||
1213 | 1216 | ||
1214 | if (new != old) { | 1217 | if (new != old) { |
1215 | neigh_del_timer(neigh); | 1218 | neigh_del_timer(neigh); |