mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 00:10:11 +01:00
ifcfg-rh: emit a warning when DEFROUTE=no and GATEWAY is set
This commit is contained in:
parent
c1907a218a
commit
5b70254ea0
1 changed files with 5 additions and 0 deletions
|
|
@ -984,6 +984,8 @@ make_ip4_setting (shvarFile *ifcfg,
|
|||
goto done;
|
||||
(void) nm_setting_ip_config_add_address (s_ip4, addr);
|
||||
nm_ip_address_unref (addr);
|
||||
if (never_default)
|
||||
PARSE_WARNING ("GATEWAY will be ignored when DEFROUTE is disabled");
|
||||
g_object_set (s_ip4, NM_SETTING_IP_CONFIG_GATEWAY, gateway, NULL);
|
||||
}
|
||||
return NM_SETTING (s_ip4);
|
||||
|
|
@ -1082,6 +1084,9 @@ make_ip4_setting (shvarFile *ifcfg,
|
|||
}
|
||||
g_object_set (s_ip4, NM_SETTING_IP_CONFIG_GATEWAY, gateway, NULL);
|
||||
|
||||
if (gateway && never_default)
|
||||
PARSE_WARNING ("GATEWAY will be ignored when DEFROUTE is disabled");
|
||||
|
||||
/* DNS servers
|
||||
* Pick up just IPv4 addresses (IPv6 addresses are taken by make_ip6_setting())
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue