summaryrefslogtreecommitdiff
path: root/src/conf_mode/vpn_pptp.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/conf_mode/vpn_pptp.py')
-rwxr-xr-xsrc/conf_mode/vpn_pptp.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/conf_mode/vpn_pptp.py b/src/conf_mode/vpn_pptp.py
index d76cd4147..653b21161 100755
--- a/src/conf_mode/vpn_pptp.py
+++ b/src/conf_mode/vpn_pptp.py
@@ -194,8 +194,10 @@ def get_config():
if conf.exists(['gateway-address']):
pptp['gw_ip'] = conf.return_value(['gateway-address'])
else:
- pptp['gw_ip'] = re.sub(
- '[0-9]+$', '1', pptp['client_ip_pool'])
+ # calculate gw-ip-address
+ if conf.exists(['client-ip-pool', 'start']):
+ # use start ip as gw-ip-address
+ pptp['gateway_address'] = conf.return_value(['client-ip-pool', 'start'])
if conf.exists(['authentication', 'require']):
# clear default list content, now populate with actual CLI values
@@ -246,9 +248,6 @@ def generate(pptp):
if not pptp:
return None
- import pprint
- pprint.pprint(pptp)
-
dirname = os.path.dirname(pptp_conf)
if not os.path.exists(dirname):
os.mkdir(dirname)