summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2018-08-20 20:01:13 +0200
committerGitHub <noreply@github.com>2018-08-20 20:01:13 +0200
commitaa8b8e574e44917f5bd1a777fc9b816fe9d1580c (patch)
tree6edbfc80ee233aff6475ddc5d9a74dcb5af123be
parentbd70e8b030121a95eb9f9abcbe137917329020b8 (diff)
parent2a4b380ecdf5c51a41dfee64652cd77789a8204c (diff)
downloadvyos-1x-aa8b8e574e44917f5bd1a777fc9b816fe9d1580c.tar.gz
vyos-1x-aa8b8e574e44917f5bd1a777fc9b816fe9d1580c.zip
Merge pull request #38 from hagbard-01/current
T427, T783 minor bugfixes
-rw-r--r--interface-definitions/wireguard.xml2
-rwxr-xr-xsrc/conf_mode/wireguard.py6
2 files changed, 2 insertions, 6 deletions
diff --git a/interface-definitions/wireguard.xml b/interface-definitions/wireguard.xml
index eec7a404b..1437e9f0c 100644
--- a/interface-definitions/wireguard.xml
+++ b/interface-definitions/wireguard.xml
@@ -72,7 +72,7 @@
<properties>
<help>how often send keep alives in seconds</help>
<constraint>
- <regex>^(1|[1-9][0-9]{0,5})$</regex>
+ <regex>^(1|[1-9][0-9]{1,5})$</regex>
</constraint>
<constraintErrorMessage>keepliave timer has to be between 1 and 99999 seconds</constraintErrorMessage>
</properties>
diff --git a/src/conf_mode/wireguard.py b/src/conf_mode/wireguard.py
index e1c076e2a..a4f876397 100755
--- a/src/conf_mode/wireguard.py
+++ b/src/conf_mode/wireguard.py
@@ -209,13 +209,9 @@ def apply(c):
if val_eff and not val:
c['interfaces'][intf]['peer'][p]['persistent-keepalive'] = 0
- ### set ne keepalive value
+ ### set new keepalive value
if not val_eff and val:
c['interfaces'][intf]['peer'][p]['persistent-keepalive'] = val
-
- ## config == effective config, no change
- if val_eff == val:
- del c['interfaces'][intf]['peer'][p]['persistent-keepalive']
## wg command call
configure_interface(c,intf)