summaryrefslogtreecommitdiff
path: root/package/network
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-02-22 08:29:34 +0000
committerJohn Crispin <john@openwrt.org>2015-02-22 08:29:34 +0000
commit5e7d00463338825a9f7b0faddd406dbe1841d958 (patch)
treebc643bab829955af68c3c930f70d4f620ea23abd /package/network
parent291e04ee8f47b86cbe3b63f2434c1c5e80bab678 (diff)
downloadmtk-20170518-5e7d00463338825a9f7b0faddd406dbe1841d958.zip
mtk-20170518-5e7d00463338825a9f7b0faddd406dbe1841d958.tar.gz
mtk-20170518-5e7d00463338825a9f7b0faddd406dbe1841d958.tar.bz2
ppp: Allow PPTP over a specified interface
In a dual-WAN setup, it's useful to specify an interface over which to have PPTP. Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> SVN-Revision: 44507
Diffstat (limited to 'package/network')
-rwxr-xr-xpackage/network/services/ppp/files/ppp.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/package/network/services/ppp/files/ppp.sh b/package/network/services/ppp/files/ppp.sh
index ba3b412..b4a7467 100755
--- a/package/network/services/ppp/files/ppp.sh
+++ b/package/network/services/ppp/files/ppp.sh
@@ -181,6 +181,7 @@ proto_pppoa_teardown() {
proto_pptp_init_config() {
ppp_generic_init_config
proto_config_add_string "server"
+ proto_config_add_string "interface"
available=1
no_device=1
}
@@ -189,10 +190,11 @@ proto_pptp_setup() {
local config="$1"
local iface="$2"
- local ip serv_addr server
- json_get_var server server && {
+ local ip serv_addr server interface
+ json_get_vars interface server
+ [ -n "$server" ] && {
for ip in $(resolveip -t 5 "$server"); do
- ( proto_add_host_dependency "$config" "$ip" )
+ ( proto_add_host_dependency "$config" "$ip" $interface )
serv_addr=1
done
}