aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2019-05-29 18:51:20 +0200
committerHans Dedecker <dedeckeh@gmail.com>2019-05-31 09:43:10 +0200
commit678ee30ee4c2a7d727d1b8a055faa5d274dd73ec (patch)
tree24ffef1889b7c46ca72b811ec24feffba3c77ecd /package/network/services
parent42977978e28333f51f0bf0ab3e0949271d46b992 (diff)
downloadupstream-678ee30ee4c2a7d727d1b8a055faa5d274dd73ec.tar.gz
upstream-678ee30ee4c2a7d727d1b8a055faa5d274dd73ec.tar.bz2
upstream-678ee30ee4c2a7d727d1b8a055faa5d274dd73ec.zip
ppp: add config options to tune discovery timeout and attempts
Upstream PPP project has added in commit 8e77984 options to tune discovery timeout and attempts in the rp-pppoe plugin. Expose these options in the uci datamodel for pppoe: padi_attempts: Number of discovery attempts padi_timeout: Initial timeout for discovery packets in seconds Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'package/network/services')
-rw-r--r--package/network/services/ppp/Makefile2
-rwxr-xr-xpackage/network/services/ppp/files/ppp.sh7
2 files changed, 8 insertions, 1 deletions
diff --git a/package/network/services/ppp/Makefile b/package/network/services/ppp/Makefile
index 3b36444289..c8016dc619 100644
--- a/package/network/services/ppp/Makefile
+++ b/package/network/services/ppp/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ppp
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/paulusmack/ppp
diff --git a/package/network/services/ppp/files/ppp.sh b/package/network/services/ppp/files/ppp.sh
index 2d9ca6d284..b553effd88 100755
--- a/package/network/services/ppp/files/ppp.sh
+++ b/package/network/services/ppp/files/ppp.sh
@@ -210,6 +210,9 @@ proto_pppoe_init_config() {
proto_config_add_string "ac"
proto_config_add_string "service"
proto_config_add_string "host_uniq"
+ proto_config_add_int "padi_attempts"
+ proto_config_add_int "padi_timeout"
+
lasterror=1
}
@@ -227,12 +230,16 @@ proto_pppoe_setup() {
json_get_var ac ac
json_get_var service service
json_get_var host_uniq host_uniq
+ json_get_var padi_attempts padi_attempts
+ json_get_var padi_timeout padi_timeout
ppp_generic_setup "$config" \
plugin rp-pppoe.so \
${ac:+rp_pppoe_ac "$ac"} \
${service:+rp_pppoe_service "$service"} \
${host_uniq:+host-uniq "$host_uniq"} \
+ ${padi_attempts:+pppoe-padi-attempts $padi_attempts} \
+ ${padi_timeout:+pppoe-padi-timeout $padi_timeout} \
"nic-$iface"
}