aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
Diffstat (limited to 'net/core')
-rw-r--r--net/core/neighbour.c13
-rw-r--r--net/core/rtnetlink.c2
2 files changed, 9 insertions, 6 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);
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 60c928894a78..63ce2283a456 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2810,7 +2810,7 @@ int rtnl_configure_link(struct net_device *dev, const struct ifinfomsg *ifm)
2810 } 2810 }
2811 2811
2812 if (dev->rtnl_link_state == RTNL_LINK_INITIALIZED) { 2812 if (dev->rtnl_link_state == RTNL_LINK_INITIALIZED) {
2813 __dev_notify_flags(dev, old_flags, 0U); 2813 __dev_notify_flags(dev, old_flags, (old_flags ^ dev->flags));
2814 } else { 2814 } else {
2815 dev->rtnl_link_state = RTNL_LINK_INITIALIZED; 2815 dev->rtnl_link_state = RTNL_LINK_INITIALIZED;
2816 __dev_notify_flags(dev, old_flags, ~0U); 2816 __dev_notify_flags(dev, old_flags, ~0U);