Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ovs-monitor-ipsec: Fix active connection regex.
Connections are added to IPsec using a connection name that is determined from the OVS port name and the tunnel type. GRE connections take the form: <iface>-<ver> Other connections take the form: <iface>-in-<ver> <iface>-out-<ver> The regex '|' operator parses strings left to right looking for the first match that it can find. '.*' is also greedy. This causes incorrect interface names to be parsed from active connections as other tunnel types are parsed as type GRE. This gives unexpected "is outdated" warnings and the connection is torn down. For example, 'ovn-424242-in-1' will produce an incorrect interface name of 'ovn-424242-in' instead of 'ovn-424242'. There are a number of ways this could be resolved including a cleverer regular expression, or re.findall(). However, this approach was taken as it simplifies the code easing maintainability. Fixes: 22c5eaf ("ipsec: reintroduce IPsec support for tunneling") Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1908789 Signed-off-by: Mark Gray <[email protected]> Acked-by: Eelco Chaudron <[email protected]> Acked-by: Flavio Leitner <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
- Loading branch information