From de59b9aeef4e89788d260007830c5ea2987b519f Mon Sep 17 00:00:00 2001 From: Daniel Pro <43214013+daniel-pro@users.noreply.github.com> Date: Thu, 21 Feb 2019 15:13:17 +0100 Subject: T1256: Execute "show ipsec vpn ipsec sa" returns incorrect results Not sure it's a normal case scenario, the one highlighted in T1256. To managed it I changed the "if" logic. --- 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 bad4f33f0..d1385f959 100755 --- a/src/op_mode/show_ipsec_sa.py +++ b/src/op_mode/show_ipsec_sa.py @@ -67,7 +67,7 @@ status_data = [] for conn in connections: status = subprocess.check_output("ipsec statusall {0}".format(conn), shell=True).decode() - if re.search(r'no match|CONNECTING', status): + if not re.search(r'ESTABLISHED', status): status_line = [conn, "down", None, None, None, None, None] else: try: -- cgit v1.2.3