diff options
author | Thomas Haller <thaller@redhat.com> | 2017-01-02 15:55:23 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-01-04 14:18:01 +0100 |
commit | 7e4120860f98fce5f30a8ae439ba1c4b74c4a886 (patch) | |
tree | 5df17b820d1e830798a5abbe43638dfcaad5d13a | |
parent | a2dce28fc8f8319ab517f0bd4d5813f0a2acf98f (diff) | |
download | NetworkManager-7e4120860f98fce5f30a8ae439ba1c4b74c4a886.tar.gz |
device/vlan: update vlan properties when link changes
For example, when the parent link is moved to a different netns,
we must update (clear) the vlan's parent.
-rw-r--r-- | src/devices/nm-device-vlan.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c index 2e2d74b6d6..fc5a71cff6 100644 --- a/src/devices/nm-device-vlan.c +++ b/src/devices/nm-device-vlan.c @@ -202,10 +202,18 @@ update_properties (NMDevice *device) } static void -realize_start_notify (NMDevice *device, const NMPlatformLink *plink) +link_changed (NMDevice *device, + const NMPlatformLink *pllink) { - NM_DEVICE_CLASS (nm_device_vlan_parent_class)->realize_start_notify (device, plink); + NM_DEVICE_CLASS (nm_device_vlan_parent_class)->link_changed (device, pllink); + update_properties (device); +} +static void +realize_start_notify (NMDevice *device, + const NMPlatformLink *pllink) +{ + NM_DEVICE_CLASS (nm_device_vlan_parent_class)->realize_start_notify (device, pllink); update_properties (device); } @@ -654,6 +662,7 @@ nm_device_vlan_class_init (NMDeviceVlanClass *klass) object_class->dispose = dispose; parent_class->create_and_realize = create_and_realize; + parent_class->link_changed = link_changed; parent_class->realize_start_notify = realize_start_notify; parent_class->unrealize_notify = unrealize_notify; parent_class->get_generic_capabilities = get_generic_capabilities; |