diff options
author | John Crispin <blogic@openwrt.org> | 2015-02-22 08:29:34 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-02-22 08:29:34 +0000 |
commit | dd8ae0460259ae764e6becfdb4dad91a0d478392 (patch) | |
tree | 9cd61a26d66e2ea15e29057416174c6680d298ec | |
parent | 88f9ed04cab7951a2cf68e4768bb390a02a4a010 (diff) | |
download | master-187ad058-dd8ae0460259ae764e6becfdb4dad91a0d478392.tar.gz master-187ad058-dd8ae0460259ae764e6becfdb4dad91a0d478392.tar.bz2 master-187ad058-dd8ae0460259ae764e6becfdb4dad91a0d478392.zip |
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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44507 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-x | package/network/services/ppp/files/ppp.sh | 8 |
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 ba3b412316..b4a7467bf5 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 } |