net/pptpd: add static remote ip in config file

Add ability to configure a static remote ip in pptp config file
This change has backward compatibility with old config files

Also remove the MAINTAINER as intructed

Signed-off-by: Thiago Pereira Ricciardi <thiago.ricciardi@gmail.com>
This commit is contained in:
Thiago Pereira Ricciardi
2019-04-03 23:26:15 +00:00
parent 3b65a21c7c
commit 33ddd51969
2 changed files with 5 additions and 5 deletions
+4 -2
View File
@@ -12,7 +12,8 @@ OPTIONS_PPTP=/var/etc/options.pptpd
validate_login_section() {
uci_load_validate pptpd login "$1" "$2" \
'username:string' \
'password:string'
'password:string' \
'remoteip:string'
}
validate_pptpd_section() {
@@ -32,8 +33,9 @@ setup_login() {
[ -n "$username" ] || return 0
[ -n "$password" ] || return 0
[ -n "$remoteip" ] || remoteip=*
echo "$username pptp-server $password *" >> $CHAP_SECRETS
echo "$username pptp-server $password $remoteip" >> $CHAP_SECRETS
}
setup_config() {