]> git.ipfire.org Git - network.git/commitdiff
Fix setting the default route when there are zones without a gateway setting.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 31 Oct 2011 19:39:30 +0000 (19:39 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 31 Oct 2011 19:39:30 +0000 (19:39 +0000)
functions.routing

index 3a52ce4a4a18a4253698b1c121f24eedb9154037..05cd1b29062e6d6cbf3e0330111ddca438a69791 100644 (file)
@@ -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