Merge pull request #6950 from thiagoricciardi/pptpd-static-ips
net/pptpd: add static remote ip in config file
This commit is contained in:
commit
66f1e748f8
2 changed files with 5 additions and 5 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=pptpd
|
PKG_NAME:=pptpd
|
||||||
PKG_VERSION:=1.4.0
|
PKG_VERSION:=1.4.0
|
||||||
PKG_RELEASE:=4
|
PKG_RELEASE:=5
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=@SF/poptop
|
PKG_SOURCE_URL:=@SF/poptop
|
||||||
|
@ -18,8 +18,6 @@ PKG_HASH:=8fcd8b8a42de2af59e9fe8cbaa9f894045c977f4d038bbd6346a8522bb7f06c0
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/pptpd
|
define Package/pptpd
|
||||||
|
|
|
@ -12,7 +12,8 @@ OPTIONS_PPTP=/var/etc/options.pptpd
|
||||||
validate_login_section() {
|
validate_login_section() {
|
||||||
uci_load_validate pptpd login "$1" "$2" \
|
uci_load_validate pptpd login "$1" "$2" \
|
||||||
'username:string' \
|
'username:string' \
|
||||||
'password:string'
|
'password:string' \
|
||||||
|
'remoteip:string'
|
||||||
}
|
}
|
||||||
|
|
||||||
validate_pptpd_section() {
|
validate_pptpd_section() {
|
||||||
|
@ -32,8 +33,9 @@ setup_login() {
|
||||||
|
|
||||||
[ -n "$username" ] || return 0
|
[ -n "$username" ] || return 0
|
||||||
[ -n "$password" ] || 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() {
|
setup_config() {
|
||||||
|
|
Loading…
Reference in a new issue