mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 06:30:33 +01:00
ifcfg-rh: allow missing and 0.0.0.0 GATEWAYn lines in ifcfg-routes (rh #647992)
GATEWAY0=0.0.0.0 was erroneously denied. Also, missing GATEWAY0 entry caused ifcfg-rh plugin to regard the connection as invalid. The commit fixes that and makes it behave in accordance with initscripts.
This commit is contained in:
parent
f6f8ef2f8a
commit
6903571160
1 changed files with 1 additions and 6 deletions
|
|
@ -683,12 +683,7 @@ read_one_ip4_route (shvarFile *ifcfg,
|
|||
/* Next hop */
|
||||
if (!read_ip4_address (ifcfg, gw_tag, &tmp, error))
|
||||
goto out;
|
||||
if (!tmp) {
|
||||
g_set_error (error, IFCFG_PLUGIN_ERROR, 0,
|
||||
"Missing or invalid IP4 gateway address '%d'",
|
||||
tmp);
|
||||
goto out;
|
||||
}
|
||||
/* No need to check tmp, because we don't make distinction between missing GATEWAY IP and 0.0.0.0 */
|
||||
nm_ip4_route_set_next_hop (route, tmp);
|
||||
|
||||
/* Prefix */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue