From patchwork Fri Dec 6 16:44:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 8306 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 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Y4cY854xWz3wfS for ; Fri, 6 Dec 2024 16:44:28 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Y4cY65KTrz6yV; Fri, 6 Dec 2024 16:44:26 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Y4cY64pNlz32V3; Fri, 6 Dec 2024 16:44:26 +0000 (UTC) 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 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Y4cY21GPmz33Dm for ; Fri, 6 Dec 2024 16:44:22 +0000 (UTC) Received: from michael.haj.ipfire.org (michael.haj.ipfire.org [172.28.1.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "michael.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Y4cY20BLcz4ZF; Fri, 6 Dec 2024 16:44:22 +0000 (UTC) Received: by michael.haj.ipfire.org (Postfix, from userid 0) id 4Y4cY14hvxzThmg; Fri, 6 Dec 2024 16:44:21 +0000 (UTC) From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 4/4] connections.cgi: Support CIDR notation Date: Fri, 6 Dec 2024 16:44:17 +0000 Message-Id: <20241206164417.3840426-4-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241206164417.3840426-1-michael.tremer@ipfire.org> References: <20241206164417.3840426-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: 5QGFUWDBBLSFSUMJCKVNUQGCJMT5API2 X-Message-ID-Hash: 5QGFUWDBBLSFSUMJCKVNUQGCJMT5API2 X-MailFrom: root@michael.haj.ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Michael Tremer X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Michael Tremer --- html/cgi-bin/connections.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/cgi-bin/connections.cgi b/html/cgi-bin/connections.cgi index 7286f9b46..80cb4bb69 100644 --- a/html/cgi-bin/connections.cgi +++ b/html/cgi-bin/connections.cgi @@ -476,7 +476,7 @@ sub ipcolour($) { foreach my $network (@networks) { if (defined $network) { - if (&Network::check_ip_address_and_netmask($network)) { + if (&Network::check_subnet($network)) { if (&Network::ip_address_in_network($address, $network)) { return $networks{$network}; }