From patchwork Sat Feb 24 14:51:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 7560 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 ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4ThqZl19Fgz3wvx for ; Sat, 24 Feb 2024 14:51:27 +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) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4ThqZj5CdWz100; Sat, 24 Feb 2024 14:51:25 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4ThqZj33nnz2yXf; Sat, 24 Feb 2024 14:51:25 +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 ECDSA (secp384r1)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4ThqZf45Fmz2xdZ for ; Sat, 24 Feb 2024 14:51:22 +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 4ThqZb365dzmr; Sat, 24 Feb 2024 14:51:19 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1708786280; 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=kwalOL50QjirGhQlLOtX18VY6X2S8QLZTYNB8NUXsNI=; b=QCuT4jJBdc4JmWEdGK15/lbhKKJOoQReKgepZpDGPK+fnghU2/sB8iEgWVwr6c9vL6A5sc WxhqB3kLvLWJomDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1708786280; 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=kwalOL50QjirGhQlLOtX18VY6X2S8QLZTYNB8NUXsNI=; b=c9WDM+RhKZyRWXI/WzQtzMDlt/J8cFmEYM0KAnpoMDRnSdAuqbnkbEXvJZ6AlAV2+FFx5R lvG158q8SEAjlvQo+mR1CmyAfmcFu2ImPXGK8fhHUBXi8sjk92EY44OUFgy0BFFwjzcIfg wq1v4nDsG+pHi0LgMOpTYJbXRcKbvNh/XKWLfGTBTjAYtxOjAA2vpxP+0v/e2G5MKGPbxp cNUDkzveVufH633sdW76thYShiK+CPm+HHzP9B/4hQ3qOkPuS/NjEYhT4N5tzfGO7qxlIL FQglXPb0EwavIVz6wV2yWfhj2GBHhjM9ZHEoCMrg+b34U43nxf+8zNlAG260mA== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH v2] dhcp.cgi: Fixes bug#11774 - allows dhcp option of array of integer 8 Date: Sat, 24 Feb 2024 15:51:14 +0100 Message-ID: <20240224145114.10418-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: LAYFDWVRS4IGGBRO2RVSS5LZCJKJ5EMB X-Message-ID-Hash: LAYFDWVRS4IGGBRO2RVSS5LZCJKJ5EMB 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 v2 version is to correct the bug number. I entered a wronn bug number in the first version - 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#11774 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');