From: Michael Tremer Date: Mon, 31 Oct 2011 19:39:30 +0000 (+0000) Subject: Fix setting the default route when there are zones without a gateway setting. X-Git-Tag: 003~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86fae95d4e62c509cd627e82c60c024c0030460b;p=network.git Fix setting the default route when there are zones without a gateway setting. --- diff --git a/functions.routing b/functions.routing index 3a52ce4a..05cd1b29 100644 --- a/functions.routing +++ b/functions.routing @@ -49,8 +49,11 @@ function routing_default_update() { if [ "$(routing_db_get ${zone} ${proto} active)" = "1" ]; then gateway=$(routing_db_get ${zone} ${proto} remote-ip-address) + [ -z "${gateway}" ] && continue + weight=$(routing_db_get ${zone} ${proto} weight) + assert device_exists ${zone} if device_is_ppp ${zone}; then routes="${routes} dev ${zone}" else