summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhagbard <vyosdev@derith.de>2018-08-20 16:38:25 +0000
committerhagbard <vyosdev@derith.de>2018-08-20 16:58:17 +0000
commitd3bb77e6bb031270e37ceb83354a1cad9b000317 (patch)
tree47528b6461be209e658409f40acb5f73d7e1f93f /src
parentbd70e8b030121a95eb9f9abcbe137917329020b8 (diff)
downloadvyos-1x-d3bb77e6bb031270e37ceb83354a1cad9b000317.tar.gz
vyos-1x-d3bb77e6bb031270e37ceb83354a1cad9b000317.zip
bugfix: if config and effective value are equal, there is no change required, deleting it from the dict will result in a keyerror if not aset at all
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/wireguard.py6
1 files changed, 1 insertions, 5 deletions
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)