summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel <43214013+daniel-pro@users.noreply.github.com>2019-01-01 22:27:02 +0100
committerGitHub <noreply@github.com>2019-01-01 22:27:02 +0100
commit953bec9b56a71b0bd64da510e32e9586b42412fb (patch)
tree936d5236843a37d3d6e80bef5e5aec1a91ee1d64
parentd50524722819582cc1d7ad289d12e9f585f701de (diff)
downloadvyos-1x-953bec9b56a71b0bd64da510e32e9586b42412fb.tar.gz
vyos-1x-953bec9b56a71b0bd64da510e32e9586b42412fb.zip
T1119: 'show vpn ipsec sa' shows tunnel twice in 1.2.0-RC11
Removed duplicates from "connections" list.
-rwxr-xr-xsrc/op_mode/show_ipsec_sa.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/op_mode/show_ipsec_sa.py b/src/op_mode/show_ipsec_sa.py
index 117824632..4827e6691 100755
--- a/src/op_mode/show_ipsec_sa.py
+++ b/src/op_mode/show_ipsec_sa.py
@@ -32,7 +32,7 @@ def parse_ike_line(s):
# Get a list of all configured connections
with open('/etc/ipsec.conf', 'r') as f:
config = f.read()
- connections = re.findall(r'conn\s([^\s]+)\s*\n', config)
+ connections = set(re.findall(r'conn\s([^\s]+)\s*\n', config))
connections = list(filter(lambda s: s != '%default', connections))
status_data = []