dhcp: set @was_active flag for external activations
Set the @was_active flag for external activations with DHCP, so that
DHCP is retried multiple times in case of failure, as we do for
managed connections when the lease expires and for assumed
connections.
Fixes test: renewal_gw_after_dhcp_outage_for_assumed_var1
Fixes: e3113fdc4b
This commit is contained in:
@@ -5844,7 +5844,7 @@ dhcp4_start (NMDevice *self,
|
|||||||
|
|
||||||
nm_device_add_pending_action (self, NM_PENDING_ACTION_DHCP4, TRUE);
|
nm_device_add_pending_action (self, NM_PENDING_ACTION_DHCP4, TRUE);
|
||||||
|
|
||||||
if (nm_device_sys_iface_state_get (self) == NM_DEVICE_SYS_IFACE_STATE_ASSUME)
|
if (nm_device_sys_iface_state_is_external_or_assume (self))
|
||||||
priv->dhcp4.was_active = TRUE;
|
priv->dhcp4.was_active = TRUE;
|
||||||
|
|
||||||
/* DHCP devices will be notified by the DHCP manager when stuff happens */
|
/* DHCP devices will be notified by the DHCP manager when stuff happens */
|
||||||
@@ -6645,8 +6645,8 @@ dhcp6_start_with_link_ready (NMDevice *self, NMConnection *connection)
|
|||||||
self);
|
self);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nm_device_sys_iface_state_get (self) == NM_DEVICE_SYS_IFACE_STATE_ASSUME)
|
if (nm_device_sys_iface_state_is_external_or_assume (self))
|
||||||
priv->dhcp6.was_active = TRUE;
|
priv->dhcp4.was_active = TRUE;
|
||||||
|
|
||||||
return !!priv->dhcp6.client;
|
return !!priv->dhcp6.client;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user