Skip to content

Commit

Permalink
ipsec: libreswan: Fix regexp for connections waiting on child SA.
Browse files Browse the repository at this point in the history
These should be considered active, because pluto is waiting for the
other side to react.  We should not remove them or try to repair.
Such connections have an extra text between the SA number and the
name of the connection.

Ideally, we would like not to parse the output of ipsec status, since
it's very error prone, but there is, unfortunately, no other interface.

Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
igsilya committed Oct 29, 2024
1 parent 1fddefd commit 0749a54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipsec/ovs-monitor-ipsec.in
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ conn prevent_unencrypted_vxlan
return conns

for line in pout.splitlines():
m = re.search(r"#\d+: \"(.*)\".*", line)
m = re.search(r"#\d+: .*\"(.*)\".*", line)
if not m:
continue

Expand Down

0 comments on commit 0749a54

Please sign in to comment.