From patchwork Sun Jul 11 17:54:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 4508 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 (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4GNF072T3Fz3xGp for ; Sun, 11 Jul 2021 17:54:31 +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 ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4GNF050Kjkz1Pq; Sun, 11 Jul 2021 17:54:29 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4GNF045zVpz2yy9; Sun, 11 Jul 2021 17:54:28 +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 (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4GNF041jjDz2xJw for ; Sun, 11 Jul 2021 17:54:28 +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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4GNF036LrMz14c; Sun, 11 Jul 2021 17:54:27 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1626026068; 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=XwVWNJwJr8gMmH34iaCAYb8az7MPA5+VP0aVkl2dYjM=; b=MumtlR48UPwfEGjYTsSKLp3P3XICX0BSghbJEXsNQs2Mz1ptJ7T2ZJqn9P9trJUTNnBYO3 z4+Xs6CZdcuRiGCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1626026068; 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=XwVWNJwJr8gMmH34iaCAYb8az7MPA5+VP0aVkl2dYjM=; b=uclQMBEzcOSSUDYxMzBRY82/ARvTmYC6xLb9gSwartHlbrY2NHyMCryvIXnQS/bzm/L2oD nOLiPHkTYW8SFMfiPpLHE3PR1eRU0dHKjG4er+h39OpmKf7xcOTcAdcFGj3PTMt3nuzCmW QnvIAO1jQIFIyQYG2PiAPTFahNyxs8+sUWWztmONmqplIfrW+FWV0a4o4/UejkWp72vN/z 57JJWcGfmHqa2i3kM7etz7iHcJTlqeKbzXuWnDeFclqg3w5leoZC5EuS7N4O8js5xQvM3n sE5jXiBBx9Lm/8Hs9lvqDgLa1vhu3oVxMMkpmFDi+mcujCAbPctJHQfWX15s8w== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 2/3] firewall.cgi: Fix multiple usage of configured net or interface. Date: Sun, 11 Jul 2021 19:54:17 +0200 Message-Id: <20210711175419.3582-2-stefan.schantl@ipfire.org> In-Reply-To: <20210711175419.3582-1-stefan.schantl@ipfire.org> References: <20210711175419.3582-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" When configuring a standard network as source or target the same interface would be pre-selected as firewall interface when editing an existing rule. In case an existing input rule with an configured firewall interface should be changed, the same network device has been pre-selected in the standard networks dropdown box. This easily confuses users and may lead to false configurations when saving an edited rule. Signed-off-by: Stefan Schantl --- html/cgi-bin/firewall.cgi | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index d3cddfa23..8d6adee96 100644 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -1032,7 +1032,12 @@ END { next if($defaultNetworks{$network}{'NAME'} eq "IPFire"); print "