From 953bec9b56a71b0bd64da510e32e9586b42412fb Mon Sep 17 00:00:00 2001 From: Daniel <43214013+daniel-pro@users.noreply.github.com> Date: Tue, 1 Jan 2019 22:27:02 +0100 Subject: T1119: 'show vpn ipsec sa' shows tunnel twice in 1.2.0-RC11 Removed duplicates from "connections" list. --- src/op_mode/show_ipsec_sa.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/op_mode') 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 = [] -- cgit v1.2.3