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:
Jiří Klimeš 2010-11-24 17:24:28 +01:00
parent f6f8ef2f8a
commit 6903571160

View file

@ -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 */