mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-02 16:40:58 +01:00
core: log when dynamic IP configuration is restarted and why
(cherry picked from commit6cd69fde33) (cherry picked from commit2f8e4e2b06) (cherry picked from commit8011d0b32b) (cherry picked from commit3d02df8061)
This commit is contained in:
parent
908d508b07
commit
2c358b89a2
5 changed files with 11 additions and 9 deletions
|
|
@ -448,7 +448,7 @@ supplicant_auth_state_changed(NMSupplicantInterface *iface,
|
|||
|
||||
if (state == NM_SUPPLICANT_AUTH_STATE_SUCCESS) {
|
||||
nm_clear_g_signal_handler(priv->supplicant.iface, &priv->supplicant.iface_state_id);
|
||||
nm_device_update_dynamic_ip_setup(NM_DEVICE(self));
|
||||
nm_device_update_dynamic_ip_setup(NM_DEVICE(self), "supplicant auth state changed");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4966,7 +4966,7 @@ set_unmanaged_external_down(NMDevice *self, gboolean only_if_unmanaged)
|
|||
}
|
||||
|
||||
void
|
||||
nm_device_update_dynamic_ip_setup(NMDevice *self)
|
||||
nm_device_update_dynamic_ip_setup(NMDevice *self, const char *reason)
|
||||
{
|
||||
NMDevicePrivate *priv;
|
||||
|
||||
|
|
@ -4977,6 +4977,8 @@ nm_device_update_dynamic_ip_setup(NMDevice *self)
|
|||
if (priv->state < NM_DEVICE_STATE_IP_CONFIG || priv->state > NM_DEVICE_STATE_ACTIVATED)
|
||||
return;
|
||||
|
||||
_LOGD(LOGD_DEVICE, "restarting dynamic IP configuration (%s)", reason);
|
||||
|
||||
g_hash_table_remove_all(priv->ip6_saved_properties);
|
||||
|
||||
if (priv->dhcp_data_4.client) {
|
||||
|
|
@ -5030,7 +5032,7 @@ carrier_changed(NMDevice *self, gboolean carrier)
|
|||
/* Force master to retry getting ip addresses when carrier
|
||||
* is restored. */
|
||||
if (priv->state == NM_DEVICE_STATE_ACTIVATED)
|
||||
nm_device_update_dynamic_ip_setup(self);
|
||||
nm_device_update_dynamic_ip_setup(self, "interface got carrier");
|
||||
/* If needed, also resume IP configuration that is
|
||||
* waiting for carrier. */
|
||||
if (nm_device_activate_ip4_state_in_wait(self))
|
||||
|
|
@ -5065,7 +5067,7 @@ carrier_changed(NMDevice *self, gboolean carrier)
|
|||
* tagged for carrier ignore) ensure that when the carrier appears we
|
||||
* renew DHCP leases and such.
|
||||
*/
|
||||
nm_device_update_dynamic_ip_setup(self);
|
||||
nm_device_update_dynamic_ip_setup(self, "interface got carrier");
|
||||
}
|
||||
} else {
|
||||
if (priv->state == NM_DEVICE_STATE_UNAVAILABLE) {
|
||||
|
|
@ -5480,7 +5482,7 @@ device_link_changed(NMDevice *self)
|
|||
|
||||
/* Update DHCP, etc, if needed */
|
||||
if (ip_ifname_changed)
|
||||
nm_device_update_dynamic_ip_setup(self);
|
||||
nm_device_update_dynamic_ip_setup(self, "IP interface changed");
|
||||
|
||||
was_up = priv->up;
|
||||
priv->up = NM_FLAGS_HAS(pllink->n_ifi_flags, IFF_UP);
|
||||
|
|
@ -5588,7 +5590,7 @@ device_ip_link_changed(NMDevice *self)
|
|||
priv->ip_iface_ = g_strdup(ip_iface);
|
||||
_notify(self, PROP_IP_IFACE);
|
||||
|
||||
nm_device_update_dynamic_ip_setup(self);
|
||||
nm_device_update_dynamic_ip_setup(self, "interface renamed");
|
||||
}
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
|
|
|
|||
|
|
@ -769,7 +769,7 @@ void nm_device_reactivate_ip_config(NMDevice * device,
|
|||
gboolean nm_device_update_hw_address(NMDevice *self);
|
||||
void nm_device_update_initial_hw_address(NMDevice *self);
|
||||
void nm_device_update_permanent_hw_address(NMDevice *self, gboolean force_freeze);
|
||||
void nm_device_update_dynamic_ip_setup(NMDevice *self);
|
||||
void nm_device_update_dynamic_ip_setup(NMDevice *self, const char *reason);
|
||||
guint nm_device_get_supplicant_timeout(NMDevice *self);
|
||||
|
||||
gboolean nm_device_auth_retries_try_next(NMDevice *self);
|
||||
|
|
|
|||
|
|
@ -2603,7 +2603,7 @@ supplicant_iface_notify_current_bss(NMSupplicantInterface *iface,
|
|||
* Also, some APs (e.g. Cisco) can be configured to drop
|
||||
* all traffic until DHCP completes. To support such
|
||||
* cases, renew the lease when roaming to a new AP. */
|
||||
nm_device_update_dynamic_ip_setup(NM_DEVICE(self));
|
||||
nm_device_update_dynamic_ip_setup(NM_DEVICE(self), "roamed to a different AP");
|
||||
}
|
||||
|
||||
set_current_ap(self, new_ap, TRUE);
|
||||
|
|
|
|||
|
|
@ -6335,7 +6335,7 @@ do_sleep_wake(NMManager *self, gboolean sleeping_changed)
|
|||
&& !nm_device_get_unmanaged_flags(device, NM_UNMANAGED_SLEEPING)) {
|
||||
/* DHCP leases of software devices could have gone stale
|
||||
* so we need to renew them. */
|
||||
nm_device_update_dynamic_ip_setup(device);
|
||||
nm_device_update_dynamic_ip_setup(device, "wake up");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue