[OpenWrt-Devel] [PATCH v2] ppp: Allow PPTP over a specified interface
Daniel Gimpelevich
daniel at gimpelevich.san-francisco.ca.us
Fri Feb 13 05:25:06 EST 2015
On Fri, 13 Feb 2015 10:18:47 +0000, Daniel Gimpelevich wrote:
> In a dual-WAN setup, it's useful to specify an interface over which to
> have PPTP.
Whoops, sent an out-of-date patch by mistake. Here's the real one.
Signed-off-by: Daniel Gimpelevich <daniel at gimpelevich.san-francisco.ca.us>
--- a/package/network/services/ppp/files/ppp.sh (revision 44437)
+++ b/package/network/services/ppp/files/ppp.sh (working copy)
@@ -181,6 +181,7 @@
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 @@
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
}
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list