mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 16:10:11 +01:00
manager: assume DHCP if we see a lease on taking over an initramfs connection
In general, we aren't really able to tell, but when we see a lease file we're pretty sure that DHCP is what was going on. https://bugzilla.redhat.com/show_bug.cgi?id=1771792 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/335 Fixes:f2fe6c03ee('manager: don't treat the initramfs-configured DHCP connections as generated') (cherry picked from commit7a84388a9b)
This commit is contained in:
parent
3a133e2826
commit
e19138b94c
1 changed files with 6 additions and 0 deletions
|
|
@ -2741,6 +2741,12 @@ recheck_assume_connection (NMManager *self,
|
|||
activation_type_assume = TRUE;
|
||||
|
||||
if (generated) {
|
||||
/* Reset the IPv4 setting to empty method=auto, regardless of what assumption guessed. */
|
||||
nm_connection_add_setting (nm_settings_connection_get_connection (sett_conn),
|
||||
g_object_new (NM_TYPE_SETTING_IP4_CONFIG,
|
||||
NM_SETTING_IP_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO,
|
||||
NULL));
|
||||
|
||||
nm_settings_connection_update (sett_conn,
|
||||
NULL,
|
||||
NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue