From patchwork Fri May 24 23:43:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Bitsch X-Patchwork-Id: 2261 Return-Path: Received: from mail01.ipfire.org (mail01.i.ipfire.org [172.28.1.200]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail01.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web07.i.ipfire.org (Postfix) with ESMTPS id 4CC3489FA6B for ; Fri, 24 May 2019 14:44:27 +0100 (BST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 459SK61mq3z51tbh; Fri, 24 May 2019 14:44:26 +0100 (BST) Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 459SJz3lyXz5CRZ9 for ; Fri, 24 May 2019 14:44:19 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1558705439; bh=Q3eEwdALX7nX7Jx25b5YEi/okATR4/Qy+VEKe+xt5Gg=; h=X-UI-Sender-Class:From:To:Subject:Date; b=f0cssLXWtShZpXn/7123SexsvtklPfdCnIH0KVc6tTHozub1N3p93pwqWyeYfnVma NbpRGsWNLoBJVcStmzkVtLqbrQbuZS85HstW06hGHN2o0P1kcUotJkZ9BXk4UUN3wx jdyplzyHMMkbNhG/9D5wG46DxXTRUiLglvfNBXko= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [149.172.151.26] ([149.172.151.26]) by web-mail.gmx.net (3c-app-gmx-bs42.server.lan [172.19.170.94]) (via HTTP); Fri, 24 May 2019 15:43:59 +0200 MIME-Version: 1.0 Message-ID: From: "Bernhard Bitsch" To: "IPFire Development" Subject: [PATCH] Fix for bug #12050 Date: Fri, 24 May 2019 15:43:59 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:mjKpgd5wVknnQCzq/gZB5u3wtwOPAqjwGQldPSfas3aJYTnfvC9cjKo+RDe+zTqVD6px/ uWej8LdjsL0CZK8eywDfFet0ojMFa4U3F59roPr1MCxits1y0EZYQ1/WKxT65//u2F88aM/wmKvJ QEd9b5CzDJX/7ureylGzGFTGDRlJ4Y4rVhFds+zTwi9Mcza8bF9v6f9wHo342yfeWQe32YyuabEX blj570T7o2WrDObkaYV4cGC74+4+7D+NWXGsbyHcolQGMqHHJD4GBHLwuZYw4IDY+Q/3Ob4Sy6/V QQ= X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:vDbjoKSGZsg=:0YrhUc9EbfSrSW02cODNiy ad5tyCZRIZLI7E+FcDfU3q52dAmEPuih0dUWoPH3k1qis5xoFTzKckyrsbQ3kGcOEhhMfY+NE Hmvet3/LoxTi/By6g5VIPZuO1Gw+EG/OQ+2gLTI9m5fclCbAxwQy/xyf+iYj1mvN1ijM6Z8S+ o8bIsY1L1aJdSpvfGXcrnAz6fs4XDK8XgcCfNeZ4KWuR6Yn+IsPIbgoSV3DpJoFBaunuqYRih 8HqpmTicYLgB2U1IghlL7hemB4W08n8ywxapA0F1oHR3SYoAmrnmJtyUU29hf+9JeO5S4EigM faB5LUpD+6Mmc15V/Daxy5kNdZebcfX3mchHSfyt2YbxhRtFgJUZD+xxj81jGH/T+JcH5gHo/ WRL6A8ZD4Z1IoM5w28f5x2UnpbfczNiY5YJKDPO0xS74iPX9V4qDZDN4MSCcdPP2ktNC7WOYT V41BRbHWnXX9dWIROwdaFnGo5YfNll0pegS3+2tOwmz0B05Z9Wt2P2RSsezHT/c9U3YjGelMp cCV2MjEYZq3adD60ArDZkuFzNwoK0p2r62FHIxMRiqkr04UolcNYttyjMX1KQtaYxUSHcqKsp LwNpfRvvJ12HutpOSew/qVK4kRZ5Z97mvVtwxMx0gPFfOMWCPGoBffRg== Authentication-Results: mail01.ipfire.org; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=f0cssLXW; dmarc=none; spf=pass (mail01.ipfire.org: domain of Bernhard.Bitsch@gmx.de designates 212.227.15.18 as permitted sender) smtp.mailfrom=Bernhard.Bitsch@gmx.de X-Rspamd-Queue-Id: 459SJz3lyXz5CRZ9 X-Spamd-Result: default: False [-5.92 / 11.00]; R_SPF_ALLOW(-0.20)[+ip4:212.227.15.0/25]; FREEMAIL_FROM(0.00)[gmx.de]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[mx00.emig.gmx.net,mx01.emig.gmx.net]; DKIM_TRACE(0.00)[gmx.net:+]; HAS_X_PRIO_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmx.de]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; RCVD_TLS_LAST(0.00)[]; BAYES_HAM(-3.00)[100.00%]; RCVD_IN_DNSWL_LOW(-0.10)[18.15.227.212.list.dnswl.org : 127.0.3.1]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450]; RECEIVED_SPAMHAUS_PBL(0.00)[26.151.172.149.zen.spamhaus.org : 127.0.0.10]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[gmx.de]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(0.00)[ipnet: 212.227.0.0/16(-4.91), asn: 8560(-3.57), country: DE(-0.09)]; NEURAL_HAM(-2.81)[-0.936,0]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mail01.i.ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 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" Save fixed leases to file after addition of a new lease Signed-off-by: Bernhard Bitsch --- html/cgi-bin/dhcp.cgi | 3 +++ 1 file changed, 3 insertions(+) -- 2.21.0.windows.1 diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi index 675d80012..19c55eb6d 100644 --- a/html/cgi-bin/dhcp.cgi +++ b/html/cgi-bin/dhcp.cgi @@ -443,6 +443,9 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'add'}.'2') { $dhcpsettings{'FIX_ROOTPATH'} = &Header::cleanhtml($dhcpsettings{'FIX_ROOTPATH'}); if ($dhcpsettings{'KEY2'} eq '') { #add or edit ? unshift (@current2, "$dhcpsettings{'FIX_MAC'},$dhcpsettings{'FIX_ADDR'},$dhcpsettings{'FIX_ENABLED'},$dhcpsettings{'FIX_NEXTADDR'},$dhcpsettings{'FIX_FILENAME'},$dhcpsettings{'FIX_ROOTPATH'},$dhcpsettings{'FIX_REMARK'}\n"); + open(FILE, ">$filename2") or die 'Unable to open fixed lease file.'; + print FILE @current2; + close(FILE); &General::log($Lang::tr{'fixed ip lease added'}); # Enter edit mode