add static route fix from #1384
authorFelix Fietkau <nbd@openwrt.org>
Tue, 15 May 2007 18:57:08 +0000 (18:57 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 15 May 2007 18:57:08 +0000 (18:57 +0000)
SVN-Revision: 7256

openwrt/package/base-files/Makefile
openwrt/package/base-files/default/etc/functions.sh

index 6422b69118e30ffdf9702d5ed01f64cb84327e81..ea35074bcf6586725d1a9702e30fea30ae2f0790 100644 (file)
@@ -3,7 +3,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 PKG_BUILD_DIR:=$(BUILD_DIR)/base-files
 
 include $(TOPDIR)/package/rules.mk
index 70b30868491645fb362c3215f5eca34980db485a..57f2734c1c4c047312e7383b2a6e534840d91591 100755 (executable)
@@ -56,10 +56,11 @@ do_ifup() {
                [ -n "$static_route" ] && {
                        for route in $static_route; do {
                        eval "set $(echo $route | sed 's/:/ /g')"
-                               if [ "$2" = "255.255.255.255" ]; then
+                               if [ "$2" = "0.0.0.0" ]; then
                                        opt="-host"
                                fi
                                $DEBUG route add ${opt:-"-net"} $1 netmask $2 gw $3 metric $4 
+                               unset opt
                        } done
                }