Fix return value on success if the first route addition succeeded

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4183 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-10-15 17:57:09 +00:00
parent 505064221d
commit d45930afd2

View file

@ -656,7 +656,9 @@ nm_system_replace_default_ip4_route (const char *iface, guint32 gw, guint32 mss)
g_return_val_if_fail (nlh != NULL, FALSE);
err = replace_default_ip4_route (iface, gw, mss);
if (err != -ESRCH) {
if (err == 0) {
return TRUE;
} else if (err != -ESRCH) {
nm_warning ("replace_default_ip4_route() returned error %s (%d)",
strerror (err), err);
return FALSE;