From patchwork Tue Jun 4 20:24:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Bitsch X-Patchwork-Id: 2277 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 4971888892E for ; Tue, 4 Jun 2019 11:37:00 +0100 (BST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 45J7dl2VPtz58BPf; Tue, 4 Jun 2019 11:36:59 +0100 (BST) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (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 45J7dg1V5Yz5K46v for ; Tue, 4 Jun 2019 11:36:55 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1559644597; bh=Q3eEwdALX7nX7Jx25b5YEi/okATR4/Qy+VEKe+xt5Gg=; h=X-UI-Sender-Class:From:To:Subject:Date; b=XG8pWMwQlAFwbnRt/iB2Z0zAdCg7bI9SCx9+vQjUwcBKhrvvILyycOWhkNbdUztfD LLOKaER6AaViVeNPr/ANU8G7agJd+Y2pm4vTzGhXJ0O1GPH3n6SEVd2B5UIIfDLIxC xlKui4hujTx2xoMDlp3oyvDfCXevlvqsYyQ8HP20= 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-bs71.server.lan [172.19.170.216]) (via HTTP); Tue, 4 Jun 2019 12:24:00 +0200 MIME-Version: 1.0 Message-ID: From: "Bernhard Bitsch" To: "IPFire Development" Subject: [PATCH] dhcp.cgi: Fix for bug #12050 Date: Tue, 4 Jun 2019 12:24:00 +0200 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:l9jIvHq0AsmGJz+2fgqjFJeIc0KMbAOx1jU4zfLpG1UWxXkf3KDZ2YeLCHpb7cNqgHq+h DzqFJ2HGgks2w/uZey1qkvXy/J3Z0GhAJ+ZgQDgqZft48RSJ2bIN2ngXErNlAAAUIiXUsZZPdpEg UaAoMCVcqiq2lURzYzr8qdHWHRnDwIE3+IIYKvAjxaWetDPhh53Pw8KRy1kddcslOKR73m3dpz9z 8F8ZYgbiZQ1H5qywzcWPFcp6fuNBb3bR3pkUGwFH4/BujnLw2Ula1VI4zAZYo9WzTHf280l5YD9I Kg= X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:qxuDqB7xM8Q=:wOU9I1aUBHGSlehSC1WM/f RxtGnXtaZ2/7hTBtHZhUtjbtwtown/6kb9S7QX7nUS3ys7/52sWHiL2frUb3LkWQa6JMPE4aR /40Kzm7M+uBBJ7q65uKmzS5A8c5Pb+Pd4r2mqKD+AQ4kIMv2V9Taantejk+yBZC2hUbZ8wXC3 Z2aU+fXGSTB/GwTVto7w+DX1NMSK3/W36nt1rKjg3bJgOzCa4m0SLLNmc7TJc7rOzAN6RfGmF PjCtGTm2WfXt6uDHCuP79u0bw11x9zVds2Hhbd5JsKhvjh2mOJBc7YL2V087CsNTaQ00rOGkm fqMaRRhiXC7sTiJsKDTPbTaWDrf4wlsm5YnK0ZcvjxiA7l5BQgJ3AQDH8yoK0watN+wFjWM+G c5I8ONBQa300hKeIUcSb6dWw8DuRTP+iB/J9pJ96ntCGUNikMayVFMY34+bhpW5Wj/i71S5AF oK8ZSdb+dq4VmND6dIZdpoFqG738u2ViyiguhGlmVec5PeL4ewTaEZP5P9hUpjMLe0oE9pYQk LYCwToeVHNLhGAeCduSocXdZoOw+DSqSmpOS7Xm2zLnkOib0Fw9mRDKMeC1Xf+QNYdNF+8hpi Jri2rKPiJ+1hmGVkm6xMs+w4YvHOB9sHJgzKPe3/DvUPhrbXN0SnLJAQ== Authentication-Results: mail01.ipfire.org; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=XG8pWMwQ; dmarc=none; spf=pass (mail01.ipfire.org: domain of Bernhard.Bitsch@gmx.de designates 212.227.17.20 as permitted sender) smtp.mailfrom=Bernhard.Bitsch@gmx.de X-Rspamd-Queue-Id: 45J7dg1V5Yz5K46v X-Spamd-Result: default: False [-6.11 / 11.00]; R_SPF_ALLOW(-0.20)[+ip4:212.227.17.0/27]; FREEMAIL_FROM(0.00)[gmx.de]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmx.net:+]; MX_GOOD(-0.01)[mx00.emig.gmx.net,mx01.emig.gmx.net]; HAS_X_PRIO_THREE(0.00)[3]; RCVD_IN_DNSWL_LOW(-0.10)[20.17.227.212.list.dnswl.org : 127.0.3.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RECEIVED_SPAMHAUS_PBL(0.00)[26.151.172.149.zen.spamhaus.org : 127.0.0.10]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; FREEMAIL_ENVFROM(0.00)[gmx.de]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450]; BAYES_HAM(-3.00)[100.00%]; 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]; RCVD_TLS_LAST(0.00)[]; NEURAL_HAM(-3.00)[-0.999,0]; IP_SCORE(0.00)[ipnet: 212.227.0.0/16(-4.93), asn: 8560(-3.76), country: DE(-0.08)]; 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