gre: Change hostdependcy to remote endpoint tunnel address
[openwrt-14.07/.git] / package / network / config / gre / files / gre.sh
index 38c0fc4841044ed0e66dadf8961b37e06ae9afed..1728b01fcca702d5e3b64a1af39c44f34fd55fe7 100755 (executable)
@@ -51,7 +51,7 @@ gre_setup() {
                exit
        }
 
-       ( proto_add_host_dependency "$cfg" "0.0.0.0" "$tunlink" )
+       ( proto_add_host_dependency "$cfg" "$peeraddr" "$tunlink" )
 
        [ -z "$ipaddr" ] && {
                local wanif="$tunlink"
@@ -108,7 +108,7 @@ grev6_setup() {
                exit
        }
 
-       ( proto_add_host_dependency "$cfg" "::" "$tunlink" )
+       ( proto_add_host_dependency "$cfg" "$peer6addr" "$tunlink" )
 
        [ -z "$ip6addr" ] && {
                local wanif="$tunlink"