summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2010-11-24 17:24:28 +0100
committerJiří Klimeš <jklimes@redhat.com>2010-11-24 17:24:28 +0100
commit690357116017c190aab0cfed7612c3b16cb269df (patch)
tree3c54f4905b8736b4ab566f08c902ee10cadb2402
parentf6f8ef2f8a1f0c89c78f85f48bf88c62dcad5aec (diff)
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.
-rw-r--r--system-settings/plugins/ifcfg-rh/reader.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/system-settings/plugins/ifcfg-rh/reader.c b/system-settings/plugins/ifcfg-rh/reader.c
index f25acc892d..b4ee1307b9 100644
--- a/system-settings/plugins/ifcfg-rh/reader.c
+++ b/system-settings/plugins/ifcfg-rh/reader.c
@@ -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 */