From patchwork Tue Oct 29 10:15:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Maximets X-Patchwork-Id: 2003666 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Xd5l94C0lz1xxC for ; Tue, 29 Oct 2024 21:16:37 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C7E444076C; Tue, 29 Oct 2024 10:16:35 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id XasCG88ezoyy; Tue, 29 Oct 2024 10:16:34 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 791424088E Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 791424088E; Tue, 29 Oct 2024 10:16:34 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 22635C08AA; Tue, 29 Oct 2024 10:16:34 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 11974C08A9 for ; Tue, 29 Oct 2024 10:16:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 25E2860D67 for ; Tue, 29 Oct 2024 10:16:29 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 0MrsnXA_cGw0 for ; Tue, 29 Oct 2024 10:16:27 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.167.66; helo=mail-lf1-f66.google.com; envelope-from=i.maximets.ovn@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org F2C1C60D5D Authentication-Results: smtp3.osuosl.org; dmarc=none (p=none dis=none) header.from=ovn.org DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org F2C1C60D5D Received: from mail-lf1-f66.google.com (mail-lf1-f66.google.com [209.85.167.66]) by smtp3.osuosl.org (Postfix) with ESMTPS id F2C1C60D5D for ; Tue, 29 Oct 2024 10:16:25 +0000 (UTC) Received: by mail-lf1-f66.google.com with SMTP id 2adb3069b0e04-539f0f9ee49so5593483e87.1 for ; Tue, 29 Oct 2024 03:16:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730196982; x=1730801782; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ExnzGMXQlKnNTYcuh0dGEVNPSlvLcVyJRnJ+AkcF2Fc=; b=MnHvf1f/6FPCn2N7HpTnhRztMDFOH0p7ZgurjuxwxEd+resLRu9NXnU2ONJN+8iKZk m77UMrqmNnuka1xKcIM7Lr7tN1iZfWU3S9UouvIrxwwVqFvqA/FEd6fqswC00S6qRt/t 2VPWp/iJmtNeHz0B0ZSYdkuz9x0uzv2IRuf1GqfWamyEO+71LZn5s5oXizM8a7E9jUax MRFkCLDHPMJ6kGaxfIv4A+vXg3LP/IcoClc9WoOTewJN2JEQ2NC/UvXRw/nCPHULHLwY uHZOs9FhfXP4tGPUkw5Cn9LLtaY33u5hfM3jh4ygX7vNR4tmsE+TbnUfD3q/uP88uPIN XU9Q== X-Gm-Message-State: AOJu0YzDPqYHt22r/SbjapWm2aNCUFY5nKPtp+XZPfOTQZMgY2hwIJUW P6gG7uYTaC5+YeHLc6VnuPLGmA8n9ITL3AELdfY7nXu29c/84uaknRHhEwWl X-Google-Smtp-Source: AGHT+IFoWG40VQX3zmBAigRPrsOGkKPrGJ/bYVr0//B9DlASwNxJwyLqZ/4sspRwWmlw4//248ZFvg== X-Received: by 2002:a05:6512:2385:b0:539:e14b:309c with SMTP id 2adb3069b0e04-53b348cb1c6mr4477163e87.19.1730196982092; Tue, 29 Oct 2024 03:16:22 -0700 (PDT) Received: from im-t490s.redhat.com (ip-86-49-44-151.bb.vodafone.cz. [86.49.44.151]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-431b4594ec3sm20279685e9.1.2024.10.29.03.16.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2024 03:16:21 -0700 (PDT) From: Ilya Maximets To: ovs-dev@openvswitch.org Date: Tue, 29 Oct 2024 11:15:02 +0100 Message-ID: <20241029101608.2991596-5-i.maximets@ovn.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241029101608.2991596-1-i.maximets@ovn.org> References: <20241029101608.2991596-1-i.maximets@ovn.org> MIME-Version: 1.0 Subject: [ovs-dev] [PATCH 4/9] ipsec: libreswan: Fix regexp for connections waiting on child SA. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ilya Maximets Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" 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 --- ipsec/ovs-monitor-ipsec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipsec/ovs-monitor-ipsec.in b/ipsec/ovs-monitor-ipsec.in index d667c08bc..3b2057389 100755 --- a/ipsec/ovs-monitor-ipsec.in +++ b/ipsec/ovs-monitor-ipsec.in @@ -765,7 +765,7 @@ conn prevent_unencrypted_vxlan return conns def get_active_conns(self): - return self.get_conns_from_status(r"#\d+: \"(.*)\".*") + return self.get_conns_from_status(r"#\d+: .*\"(.*)\".*") def get_loaded_conns(self): return self.get_conns_from_status(r"\"(.*)\":.*(===|---).*")