From patchwork Sat Feb 24 14:35:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 7559 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) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4ThqDc28s4z3wvx for ; Sat, 24 Feb 2024 14:35:44 +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 (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4ThqDY1Mqyz100; Sat, 24 Feb 2024 14:35:41 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4ThqDX73xXz30GC; Sat, 24 Feb 2024 14:35:40 +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) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4ThqDW4fzDz2xdZ for ; Sat, 24 Feb 2024 14:35:39 +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 (secp384r1) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4ThqDV2Rknz100; Sat, 24 Feb 2024 14:35:37 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1708785338; 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; bh=a21zpN6VvMaqtZlheYumSAzGtMSj1PdSrIvP7uhQpOI=; b=0MrymiePiHey9rCKJn/TTqhU50YzGYY+KjMd3eGAJsbXXmSRYWTvr3mExQx5DVnlgdEJ63 iiVAXXgU9WygvIAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1708785338; 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; bh=a21zpN6VvMaqtZlheYumSAzGtMSj1PdSrIvP7uhQpOI=; b=oeJZNcAC5oOwx3yY5gLSCvyyOWXc9qFWW4JbJhw9XDcA+42AsR6btiHW1yxNZxeLs/LFVx tf0Ik25FtMk9kuhR7eHLVdx0nWseEEnZX4CXEHRFiO4yPn93bZ6QwHYEN/D7Cn2eOl7xc3 S1ys44CNjC+pQSfiSc18XN/T0zYCPdNmUcXpVce9umSHwq5Li8Brin3aLC9NTrZRvotCeR 679XKBaAAAmshiDYnl6uWsvlJtKcmar0UtL9ZH4Nf/+INS4Olnn5/gPf5uxee01GpaTM6t wf92h0xxL/XqCwONWWnY51wBuMCHEmdgGMkCIagM+fPNjK2I+qolA2GAUZAnoA== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH] dhcp.cgi: Fixes bug#12070 - allows dhcp option of array of integer 8 Date: Sat, 24 Feb 2024 15:35:31 +0100 Message-ID: <20240224143531.9122-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: 37FENTXZMTBBMLUHRJAO6WBVCZDDKTDG X-Message-ID-Hash: 37FENTXZMTBBMLUHRJAO6WBVCZDDKTDG X-MailFrom: adolf.belka@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 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: - This extends the allowed options from just array of ip-address to also include integer 8 or integer 16 or integer 32. - Tested out on vm testbed. The array of integer 8 (or 16 or 32) is acceptewd by the dhcp options section. I am not able to test out that the function actually works as I don't have any dhcp situation set up to use that capability. - Records or array of records is still not included. It was only an expansion of the array of section to include integers. Fixes: bug#12070 Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- html/cgi-bin/dhcp.cgi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi index c079fe1ae..be00f199a 100644 --- a/html/cgi-bin/dhcp.cgi +++ b/html/cgi-bin/dhcp.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2023 IPFire Team # +# Copyright (C) 2007-2024 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -48,7 +48,7 @@ my @nosaved=(); my %color = (); #Basic syntax allowed for new Option definition. Not implemented: RECORDS & array of RECORDS -our $OptionTypes = 'boolean|((un)?signed )?integer (8|16|32)|ip-address|text|string|encapsulate \w+|array of ip-address'; +our $OptionTypes = 'boolean|((un)?signed )?integer (8|16|32)|ip-address|text|string|encapsulate \w+|array of (ip-address|integer (8|16|32))'; &Header::showhttpheaders(); our @ITFs=('GREEN');