mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 14:58:09 +02:00
device: ensure not rescheduling IP config changed on initial capture
update_ip4_config() and update_ip6_config() are called from nm_device_capture_initial_config().
At that point, we don't expect any activation-source scheduled, thus the "if" should not
not be hit anyway.
So, this patch should actually make no difference, but it seems clearer
to me. Also, because it would be a bug to re-schedule the idle handler
that is already pending, but from inspecting nm_device_capture_initial_config()
it is not immediately clear that this cannot be the case.
(cherry picked from commit bac06c5ae6)
This commit is contained in:
parent
dbc735d3f8
commit
1f04cef99d
1 changed files with 8 additions and 6 deletions
|
|
@ -8787,9 +8787,10 @@ update_ip4_config (NMDevice *self, gboolean initial)
|
||||||
* 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.
|
||||||
*/
|
*/
|
||||||
if (activation_source_is_scheduled (self,
|
if ( !initial
|
||||||
activate_stage5_ip4_config_commit,
|
&& activation_source_is_scheduled (self,
|
||||||
AF_INET)) {
|
activate_stage5_ip4_config_commit,
|
||||||
|
AF_INET)) {
|
||||||
priv->queued_ip4_config_id = g_idle_add (queued_ip4_config_change, self);
|
priv->queued_ip4_config_id = g_idle_add (queued_ip4_config_change, self);
|
||||||
_LOGT (LOGD_DEVICE, "IP4 update was postponed");
|
_LOGT (LOGD_DEVICE, "IP4 update was postponed");
|
||||||
return;
|
return;
|
||||||
|
|
@ -8877,9 +8878,10 @@ update_ip6_config (NMDevice *self, gboolean initial)
|
||||||
* 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.
|
||||||
*/
|
*/
|
||||||
if (activation_source_is_scheduled (self,
|
if ( !initial
|
||||||
activate_stage5_ip6_config_commit,
|
&& activation_source_is_scheduled (self,
|
||||||
AF_INET6)) {
|
activate_stage5_ip6_config_commit,
|
||||||
|
AF_INET6)) {
|
||||||
priv->queued_ip6_config_id = g_idle_add (queued_ip6_config_change, self);
|
priv->queued_ip6_config_id = g_idle_add (queued_ip6_config_change, self);
|
||||||
_LOGT (LOGD_DEVICE, "IP6 update was postponed");
|
_LOGT (LOGD_DEVICE, "IP6 update was postponed");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue