diff options
author | Thomas Haller <thaller@redhat.com> | 2015-07-22 11:56:05 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-07-22 14:49:16 +0200 |
commit | 351a645ad63a9f84bef0fa8abaa0340dc1acbf21 (patch) | |
tree | 47a48c4b96f664400fcc6b1e75a3f4d7c8a54ceb | |
parent | 83dadca08ef9606a8541b26d3a2b93a66d828055 (diff) | |
download | NetworkManager-351a645ad63a9f84bef0fa8abaa0340dc1acbf21.tar.gz |
device: move setting v4_commit_first_time/v6_commit_first_time to the end of merge_and_apply()
(cherry picked from commit cbd246c9b04868ada07b4853753fdba26bca54f3)
-rw-r--r-- | src/devices/nm-device.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 867f3846f9..5eeccbe61c 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -3302,10 +3302,6 @@ ip4_config_merge_and_apply (NMDevice *self, priv->default_route.v4_has = FALSE; priv->default_route.v4_is_assumed = TRUE; - routes_full_sync = commit - && priv->v4_commit_first_time - && !nm_device_uses_assumed_connection (self); - if (!commit) { /* during a non-commit event, we always pickup whatever is configured. */ goto END_ADD_DEFAULT_ROUTE; @@ -3331,7 +3327,6 @@ ip4_config_merge_and_apply (NMDevice *self, /* we are about to commit (for a non-assumed connection). Enforce whatever we have * configured. */ - priv->v4_commit_first_time = FALSE; priv->default_route.v4_is_assumed = FALSE; if (!connection_has_default_route) @@ -3385,8 +3380,15 @@ END_ADD_DEFAULT_ROUTE: NM_DEVICE_GET_CLASS (self)->ip4_config_pre_commit (self, composite); } + routes_full_sync = commit + && priv->v4_commit_first_time + && !nm_device_uses_assumed_connection (self); + success = nm_device_set_ip4_config (self, composite, default_route_metric, commit, routes_full_sync, out_reason); g_object_unref (composite); + + if (commit) + priv->v4_commit_first_time = FALSE; return success; } @@ -3920,10 +3922,6 @@ ip6_config_merge_and_apply (NMDevice *self, priv->default_route.v6_has = FALSE; priv->default_route.v6_is_assumed = TRUE; - routes_full_sync = commit - && priv->v6_commit_first_time - && !nm_device_uses_assumed_connection (self); - if (!commit) { /* during a non-commit event, we always pickup whatever is configured. */ goto END_ADD_DEFAULT_ROUTE; @@ -3949,7 +3947,6 @@ ip6_config_merge_and_apply (NMDevice *self, /* we are about to commit (for a non-assumed connection). Enforce whatever we have * configured. */ - priv->v6_commit_first_time = FALSE; priv->default_route.v6_is_assumed = FALSE; if (!connection_has_default_route) @@ -4006,8 +4003,14 @@ END_ADD_DEFAULT_ROUTE: NM_DEVICE_GET_CLASS (self)->ip6_config_pre_commit (self, composite); } + routes_full_sync = commit + && priv->v6_commit_first_time + && !nm_device_uses_assumed_connection (self); + success = nm_device_set_ip6_config (self, composite, commit, routes_full_sync, out_reason); g_object_unref (composite); + if (commit) + priv->v6_commit_first_time = FALSE; return success; } |