aboutsummaryrefslogtreecommitdiffstats
path: root/package/ppp
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-08-29 10:07:08 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-08-29 10:07:08 +0000
commited8e12587b540e218d8999c60fa512b9cb489931 (patch)
tree355fe081198545d8eecf28ae5cb0a419e48ff65d /package/ppp
parentb379ca96bac437a7f331bd6a62486ca8a70bb9b5 (diff)
downloadupstream-ed8e12587b540e218d8999c60fa512b9cb489931.tar.gz
upstream-ed8e12587b540e218d8999c60fa512b9cb489931.tar.bz2
upstream-ed8e12587b540e218d8999c60fa512b9cb489931.zip
[package] ppp: introduce "authfail" option which specifies whether pppd should attempt to re-authenticate after a failed PAP/CHAP auth
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33291 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/ppp')
-rwxr-xr-xpackage/ppp/files/ppp.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/ppp/files/ppp.sh b/package/ppp/files/ppp.sh
index 25345b2072..7e9b8dd856 100755
--- a/package/ppp/files/ppp.sh
+++ b/package/ppp/files/ppp.sh
@@ -19,6 +19,7 @@ ppp_generic_init_config() {
proto_config_add_boolean "defaultroute"
proto_config_add_boolean "peerdns"
proto_config_add_boolean "ipv6"
+ proto_config_add_boolean "authfail"
proto_config_add_int "mtu"
}
@@ -70,7 +71,10 @@ ppp_generic_teardown() {
case "$ERROR" in
11|19)
proto_notify_error "$interface" AUTH_FAILED
- proto_block_restart "$interface"
+ json_get_var authfail authfail
+ if [ "${authfail:-0}" -gt 0 ]; then
+ proto_block_restart "$interface"
+ fi
;;
2)
proto_notify_error "$interface" INVALID_OPTIONS