diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2019-08-08 16:02:14 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2019-08-08 16:26:50 +0200 |
commit | cd664f52529260a365819037cfbd6a3f6cfef468 (patch) | |
tree | 51b0020115ff86532e5b0d9e7af9d8cc1e465ced | |
parent | 244d8bf6044691e44465691dedc6359811e5f5dc (diff) | |
download | NetworkManager-bg/reapply-update-ip-rh1731142.tar.gz |
device: update exported IP configuration before Reapply() terminatesbg/reapply-update-ip-rh1731142
Ensure the exported IP configuration is up to date when the Reapply()
D-Bus method call terminates.
https://bugzilla.redhat.com/show_bug.cgi?id=1731142
-rw-r--r-- | src/devices/nm-device.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index c08797ca4f..5a2524b485 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -11245,6 +11245,11 @@ nm_device_reactivate_ip4_config (NMDevice *self, _set_ip_state (self, AF_INET, NM_DEVICE_IP_STATE_WAIT); if (!nm_device_activate_stage3_ip4_start (self)) _LOGW (LOGD_IP4, "Failed to apply IPv4 configuration"); + /* Ensure the IP configuration exported on D-Bus is up to date + * when we return. + */ + nm_platform_process_events (nm_device_get_platform (self)); + queued_ip4_config_change (self); return; } @@ -11278,6 +11283,8 @@ nm_device_reactivate_ip4_config (NMDevice *self, if (!ip_config_merge_and_apply (self, AF_INET, TRUE)) _LOGW (LOGD_IP4, "Failed to reapply IPv4 configuration"); + + } } @@ -11319,6 +11326,11 @@ nm_device_reactivate_ip6_config (NMDevice *self, _set_ip_state (self, AF_INET6, NM_DEVICE_IP_STATE_WAIT); if (!nm_device_activate_stage3_ip6_start (self)) _LOGW (LOGD_IP6, "Failed to apply IPv6 configuration"); + /* Ensure the IP configuration exported on D-Bus is up to date + * when we return. + */ + nm_platform_process_events (nm_device_get_platform (self)); + queued_ip6_config_change (self); return; } |