diff options
author | Thomas Haller <thaller@redhat.com> | 2016-12-30 11:47:55 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-01-04 14:18:01 +0100 |
commit | bd09decf160c4a5a1b6239fbb79f189202e44fff (patch) | |
tree | 93de95f29e8aa9b5e30cf77daa6a3498dc262f5c | |
parent | 78017f1bdc300656bba2d45e079fd638d285e909 (diff) | |
download | NetworkManager-bd09decf160c4a5a1b6239fbb79f189202e44fff.tar.gz |
device: only emit notify::ifindex when the value actually changes
-rw-r--r-- | src/devices/nm-device.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index adcf55d98f..6931e3b608 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -2320,8 +2320,10 @@ update_device_from_platform_link (NMDevice *self, const NMPlatformLink *plink) _notify (self, PROP_IFACE); } - priv->ifindex = plink->ifindex; - _notify (self, PROP_IFINDEX); + if (priv->ifindex != plink->ifindex) { + priv->ifindex = plink->ifindex; + _notify (self, PROP_IFINDEX); + } priv->up = NM_FLAGS_HAS (plink->n_ifi_flags, IFF_UP); if (plink->driver && g_strcmp0 (plink->driver, priv->driver) != 0) { |