mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 16:20:14 +01:00
ifcfg-rh: missing IP4 setting means DHCP
This commit is contained in:
parent
1d882c8ade
commit
24bd77dc92
1 changed files with 5 additions and 1 deletions
|
|
@ -914,7 +914,11 @@ write_ip4_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
|
|||
if (s_ip4)
|
||||
method = nm_setting_ip4_config_get_method (s_ip4);
|
||||
|
||||
if (!s_ip4 || (method && !strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED))) {
|
||||
/* Missing IP4 setting is assumed to be DHCP */
|
||||
if (!method)
|
||||
method = NM_SETTING_IP4_CONFIG_METHOD_AUTO;
|
||||
|
||||
if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) {
|
||||
int result;
|
||||
|
||||
/* IPv4 disabled, clear IPv4 related parameters */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue