network: allow an empty gateway address in the connection editor

It appears that this has always been the intention of the code,
but the check was incomplete.

https://bugzilla.gnome.org/show_bug.cgi?id=724312
This commit is contained in:
Giovanni Campagna 2014-02-17 21:33:47 +01:00 committed by Bastien Nocera
parent 8b6f9afb72
commit 41b33dc839

View file

@ -756,7 +756,7 @@ ui_to_setting (CEPageIP4 *page)
goto out;
}
if (text_gateway && inet_pton (AF_INET, text_gateway, &tmp_gateway) <= 0) {
if (text_gateway && *text_gateway && inet_pton (AF_INET, text_gateway, &tmp_gateway) <= 0) {
goto out;
}