device: simplify postponing IP config change in queued_ip_config_change()
We don't need to cancel the current idle-action and schedule a new
one. Just return and wait to be called again.
Also, drop the logging. Similarly, we don't log the postponing for
the previous case either.
(cherry picked from commit 63cf5bd249
)
This commit is contained in:
@@ -12240,8 +12240,6 @@ queued_ip_config_change (NMDevice *self, int addr_family)
|
|||||||
if (priv->queued_state.id)
|
if (priv->queued_state.id)
|
||||||
return G_SOURCE_CONTINUE;
|
return G_SOURCE_CONTINUE;
|
||||||
|
|
||||||
priv->queued_ip_config_id_x[IS_IPv4] = 0;
|
|
||||||
|
|
||||||
/* If a commit is scheduled, this function would potentially interfere with
|
/* If a commit is scheduled, this function would potentially interfere with
|
||||||
* it changing IP configurations before they are applied. Postpone the
|
* it changing IP configurations before they are applied. Postpone the
|
||||||
* update in such case.
|
* update in such case.
|
||||||
@@ -12250,14 +12248,11 @@ queued_ip_config_change (NMDevice *self, int addr_family)
|
|||||||
IS_IPv4
|
IS_IPv4
|
||||||
? activate_stage5_ip4_config_result
|
? activate_stage5_ip4_config_result
|
||||||
: activate_stage5_ip6_config_commit,
|
: activate_stage5_ip6_config_commit,
|
||||||
addr_family)) {
|
addr_family))
|
||||||
if (IS_IPv4)
|
return G_SOURCE_CONTINUE;
|
||||||
priv->queued_ip_config_id_4 = g_idle_add (queued_ip4_config_change, self);
|
|
||||||
else
|
priv->queued_ip_config_id_x[IS_IPv4] = 0;
|
||||||
priv->queued_ip_config_id_6 = g_idle_add (queued_ip6_config_change, self);
|
|
||||||
_LOGT (LOGD_DEVICE, "IP%c update was postponed",
|
|
||||||
nm_utils_addr_family_to_char (addr_family));
|
|
||||||
} else {
|
|
||||||
update_ip_config (self, addr_family);
|
update_ip_config (self, addr_family);
|
||||||
|
|
||||||
if (!IS_IPv4) {
|
if (!IS_IPv4) {
|
||||||
@@ -12266,7 +12261,6 @@ queued_ip_config_change (NMDevice *self, int addr_family)
|
|||||||
* now. */
|
* now. */
|
||||||
linklocal6_check_complete (self);
|
linklocal6_check_complete (self);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!IS_IPv4) {
|
if (!IS_IPv4) {
|
||||||
if ( priv->state < NM_DEVICE_STATE_DEACTIVATING
|
if ( priv->state < NM_DEVICE_STATE_DEACTIVATING
|
||||||
|
Reference in New Issue
Block a user