summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)