[package] pptp: don't remove server route if the gateway is 0.0.0.0, this fixes a...
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 7 May 2010 01:57:02 +0000 (01:57 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 7 May 2010 01:57:02 +0000 (01:57 +0000)
SVN-Revision: 21393

package/pptp/files/pptp.sh

index 5151f72..b5a5c06 100644 (file)
@@ -26,7 +26,7 @@ setup_interface_pptp() {
        setup_interface "$device" "$config" "${ipproto:-dhcp}"
        local gw="$(find_gw)"
        [ -n "$gw" ] && {
-               route delete "$server" 2>/dev/null >/dev/null
+               [ "$gw" != 0.0.0.0 ] && route delete "$server" 2>/dev/null >/dev/null
                route add "$server" gw "$gw"
        }