mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-02 21:18:30 +02: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')
This commit is contained in:
parent
8a35b7ed86
commit
7a84388a9b
1 changed files with 6 additions and 0 deletions
|
|
@ -2727,6 +2727,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