diff options
author | Daniil Baturin <daniil@baturin.org> | 2019-01-02 04:38:48 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-02 04:38:48 +0700 |
commit | 8c2eec8cd0cb2f007a658d8dd65ba917c9beb755 (patch) | |
tree | 936d5236843a37d3d6e80bef5e5aec1a91ee1d64 /src/op_mode/show_ipsec_sa.py | |
parent | d50524722819582cc1d7ad289d12e9f585f701de (diff) | |
parent | 953bec9b56a71b0bd64da510e32e9586b42412fb (diff) | |
download | vyos-1x-8c2eec8cd0cb2f007a658d8dd65ba917c9beb755.tar.gz vyos-1x-8c2eec8cd0cb2f007a658d8dd65ba917c9beb755.zip |
Merge pull request #64 from daniel-pro/T1119
T1119: 'show vpn ipsec sa' shows tunnel twice in 1.2.0-RC11
Diffstat (limited to 'src/op_mode/show_ipsec_sa.py')
-rwxr-xr-x | src/op_mode/show_ipsec_sa.py | 2 |
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 = [] |