When NetworkManager initiates a expire->preinit->bound dhcp4 state
change, the
dispatcher scripts are given stale DHCP4_* values.
Tracked the problem down to nm-device.c... when the dhcp configuration
is
updated, the dispatcher is triggered before the dhcp4 state has been
updated.
I've attached a patch to re-orders the dhcp4 state change to before the
call to
dhcp4_lease_change.
Attached the patch to the bug, and also including it here for review.
Thanks,
Scott
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 61bb2aa..55b4ff8 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -2629,18 +2629,19 @@ dhcp4_state_changed (NMDHCPClient *client,
break;
}
- if (priv->ip4_state == IP_CONF)
- nm_device_activate_schedule_ip4_config_result (device, config);
- else if (priv->ip4_state == IP_DONE)
- dhcp4_lease_change (device, config);
- g_object_unref (config);
-
/* Update the DHCP4 config object with new DHCP options */
nm_dhcp4_config_reset (priv->dhcp4_config);
nm_dhcp_client_foreach_option (priv->dhcp4_client,
dhcp4_add_option_cb,
priv->dhcp4_config);
g_object_notify (G_OBJECT (device), NM_DEVICE_DHCP4_CONFIG);
+
+ if (priv->ip4_state == IP_CONF)
+ nm_device_activate_schedule_ip4_config_result (device, config);
+ else if (priv->ip4_state == IP_DONE)
+ dhcp4_lease_change (device, config);
+ g_object_unref (config);
+
break;
case DHC_TIMEOUT: /* timed out contacting DHCP server */
dhcp4_fail (device, TRUE);
_______________________________________________
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list