From patchwork Sat Apr 11 11:45:30 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 9687 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail01.haj.ipfire.org", Issuer "R12" (not verified)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4ftBgp6NmZz3x6k for ; Sat, 11 Apr 2026 11:45:42 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [IPv6:2001:678:b28::201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail02.haj.ipfire.org", Issuer "E7" (not verified)) by mail01.ipfire.org (Postfix) with ESMTPS id 4ftBgn2n7Nz7GT for ; Sat, 11 Apr 2026 11:45:41 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4ftBgl34smz34S5 for ; Sat, 11 Apr 2026 11:45:39 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [IPv6:2001:678:b28::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail01.haj.ipfire.org", Issuer "R12" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4ftBgh5vrYz33Lc for ; Sat, 11 Apr 2026 11:45:36 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4ftBgh4hxmz752; Sat, 11 Apr 2026 11:45:36 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1775907936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bYzmeUpOGQ6DbZnv3fUmMSGiY8iJhfa9iUNXwhNICJs=; b=cI7Wr8lo+6Z5E2ue6wc8X3rm3ZSTU9HEDXfpLhN6UhLEQKZXO5I4v93zi3agimlIrGTpBj JE4/A2v/0+ILzoBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1775907936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bYzmeUpOGQ6DbZnv3fUmMSGiY8iJhfa9iUNXwhNICJs=; b=A4cx6yObmlgT0e444f2dgPR1RSEJxPxLmQQjwQQGMqphaa7PG2/UpgHw95VGU8CqOgnT0n adDFSwNrWQkeezK3xnU1JQjCKuzYKsoLcq9DyIJWBYYIpV6OS3n+JIHC9SYaxmJEskXHgB y2p6PX+VoWcDR8iavOtizVKISskD++PYfGZcpqSoWjd284yGwzDo/3pSQixTG9iIt03md8 46cWazdXAmf5NAXN6ywz7WO0GtK6Uf1MBM4mo1A0HFUrh+2CFdw6FAbzAdwHr7XlC1vDWT RSsrgZwUlyXd8JbTXqqd9zuzrEIoLjdMDA1km2irRLYVM/hH0ftSrb186Sa0YA== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH 5/7] ovpnmain.cgi: Change status extraction for RW connection statistics page Date: Sat, 11 Apr 2026 13:45:30 +0200 Message-ID: <20260411114532.43348-5-adolf.belka@ipfire.org> In-Reply-To: <20260411114532.43348-1-adolf.belka@ipfire.org> References: <20260411114532.43348-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 - The format of the status file has changed in 2.7.0 - This patch changes the regex to extract requyired status to maintain the same status output Signed-off-by: Adolf Belka --- html/cgi-bin/ovpnmain.cgi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index b0d950cbb..def043d9b 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -3178,8 +3178,8 @@ END @match = split(/^Updated,(.+)/, $line); $status = $match[1]; - } elsif ( $line =~ /^(.+),(\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/) { - @match = split(m/^(.+),(\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/, $line); + } elsif ( $line =~ /^(.+),(.+\:\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/) { + @match = split(m/^(.+),(.+\:\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/, $line); # Skip the header next if ($match[1] eq "Common Name"); @@ -3196,8 +3196,8 @@ END $users[$uid]{'Country'} = &Location::Functions::lookup_country_code($address); $uid++; - } elsif ($line =~ /^(\d+\.\d+\.\d+\.\d+),(.+),(\d+\.\d+\.\d+\.\d+\:\d+),(.+)/) { - @match = split(m/^(\d+\.\d+\.\d+\.\d+),(.+),(\d+\.\d+\.\d+\.\d+\:\d+),(.+)/, $line); + } elsif ($line =~ /^(\d+\.\d+\.\d+\.\d+),(.+),(.+\:\d+\.\d+\.\d+\.\d+\:\d+),(.+)/) { + @match = split(m/^(\d+\.\d+\.\d+\.\d+),(.+),(.+\:\d+\.\d+\.\d+\.\d+\:\d+),(.+)/, $line); # Skip the header next if ($match[1] eq "Virtual Address");