From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. f1042a5d4401ff6feb16eb18f1fcd48936e8c878 Date: Mon, 11 Mar 2019 09:56:15 +0000 Message-ID: <20190311095616.5CC7084FDD4@people01.i.ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1386692570605832923==" List-Id: --===============1386692570605832923== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree". The branch, next has been updated via f1042a5d4401ff6feb16eb18f1fcd48936e8c878 (commit) via 8288c0394bb96f5aa3878ea86c05c2d92d677347 (commit) via 04f9321955606822aad7719fed4e80e26a1f82f9 (commit) via 31672dc8bdb223ebf425ff96be64318f2d68e0d7 (commit) via 4eb23a91987a39c504e10d96d89bd1de46f9c0fe (commit) via 820ab96c6927c4e3ecbbe2df1342b635cc598ce7 (commit) from 199db95a705e059972d34b578b55606a65851904 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f1042a5d4401ff6feb16eb18f1fcd48936e8c878 Author: Michael Tremer Date: Mon Mar 11 09:54:19 2019 +0000 core129: Ship updated dhcp.cgi =20 Signed-off-by: Michael Tremer commit 8288c0394bb96f5aa3878ea86c05c2d92d677347 Merge: 04f932195 31672dc8b Author: Michael Tremer Date: Mon Mar 11 09:53:56 2019 +0000 Merge remote-tracking branch 'ms/dhcp' into next commit 04f9321955606822aad7719fed4e80e26a1f82f9 Author: Peter M=C3=BCller Date: Fri Mar 8 19:17:00 2019 +0000 Tor WebUI: drop relay bandwith options < 1 MBit/s =20 Tor requires at least 1 MBit/s in order to participate. =20 Fixes #12001 =20 Signed-off-by: Peter M=C3=BCller Signed-off-by: Michael Tremer commit 31672dc8bdb223ebf425ff96be64318f2d68e0d7 Author: Michael Tremer Date: Tue Feb 26 11:02:56 2019 +0000 DHCP: Fix error when editing a newly added fixed lease =20 They key was remembered but then the array was sorted which resulted the key showing a wrong line. =20 Signed-off-by: Michael Tremer commit 4eb23a91987a39c504e10d96d89bd1de46f9c0fe Author: Michael Tremer Date: Tue Feb 26 10:18:33 2019 +0000 DHCP: Restart server in background =20 This allows for the CGI to return quicker. =20 Signed-off-by: Michael Tremer commit 820ab96c6927c4e3ecbbe2df1342b635cc598ce7 Author: Michael Tremer Date: Tue Feb 26 10:16:21 2019 +0000 DHCP: Escape slashes in filename =20 Fixes: #12006 Signed-off-by: Michael Tremer ----------------------------------------------------------------------- Summary of changes: config/rootfiles/core/129/filelists/files | 1 + html/cgi-bin/dhcp.cgi | 21 ++++++++++++++++----- html/cgi-bin/tor.cgi | 11 ++++------- lfs/tor | 2 +- 4 files changed, 22 insertions(+), 13 deletions(-) Difference in files: diff --git a/config/rootfiles/core/129/filelists/files b/config/rootfiles/cor= e/129/filelists/files index 71abbb6be..3ab81b796 100644 --- a/config/rootfiles/core/129/filelists/files +++ b/config/rootfiles/core/129/filelists/files @@ -5,6 +5,7 @@ etc/rc.d/init.d/firewall etc/rc.d/init.d/network etc/rc.d/init.d/networking/red.up/50-ipsec srv/web/ipfire/cgi-bin/credits.cgi +srv/web/ipfire/cgi-bin/dhcp.cgi srv/web/ipfire/cgi-bin/index.cgi srv/web/ipfire/cgi-bin/netovpnsrv.cgi srv/web/ipfire/cgi-bin/proxy.cgi diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi index 3eb5349a9..675d80012 100644 --- a/html/cgi-bin/dhcp.cgi +++ b/html/cgi-bin/dhcp.cgi @@ -446,15 +446,17 @@ if ($dhcpsettings{'ACTION'} eq $Lang::tr{'add'}.'2') { &General::log($Lang::tr{'fixed ip lease added'}); =20 # Enter edit mode - $dhcpsettings{'KEY2'} =3D $key; + $dhcpsettings{'KEY2'} =3D 0; } else { @current2[$dhcpsettings{'KEY2'}] =3D "$dhcpsettings{'FIX_MAC'},$dhcpset= tings{'FIX_ADDR'},$dhcpsettings{'FIX_ENABLED'},$dhcpsettings{'FIX_NEXTADDR'},= $dhcpsettings{'FIX_FILENAME'},$dhcpsettings{'FIX_ROOTPATH'},$dhcpsettings{'FI= X_REMARK'}\n"; $dhcpsettings{'KEY2'} =3D ''; # End edit mode &General::log($Lang::tr{'fixed ip lease modified'}); + + # sort newly added/modified entry + &sortcurrent2; } =20 #Write changes to dhcpd.conf. - &sortcurrent2; # sort newly added/modified entry &buildconf; # before calling buildconf which use fixed lease f= ile ! } } @@ -1272,7 +1274,7 @@ sub buildconf { print FILE ", " . $dhcpsettings{"WINS2_${itf}"} = if ($dhcpsettings{"WINS2_${itf}"}); print FILE ";\n" = if ($dhcpsettings{"WINS1_${itf}"}); print FILE "\tnext-server " . $dhcpsettings{"NEXT_${itf}"} . ";\n" if (= $dhcpsettings{"NEXT_${itf}"}); - print FILE "\tfilename \"" . $dhcpsettings{"FILE_${itf}"} . "\";\n" if = ($dhcpsettings{"FILE_${itf}"}); + print FILE "\tfilename \"" . &EscapeFilename($dhcpsettings{"FILE_${itf}= "}) . "\";\n" if ($dhcpsettings{"FILE_${itf}"}); print FILE "\tdefault-lease-time " . ($dhcpsettings{"DEFAULT_LEASE_TIME= _${itf}"} * 60). ";\n"; print FILE "\tmax-lease-time " . ($dhcpsettings{"MAX_LEASE_TIME_${i= tf}"} * 60) . ";\n"; print FILE "\tallow bootp;\n" if ($dhcpsettings{"ENABLEBOOTP_${itf}"} e= q 'on'); @@ -1325,7 +1327,7 @@ sub buildconf { print FILE "\thardware ethernet $temp[0];\n"; print FILE "\tfixed-address $temp[1];\n"; print FILE "\tnext-server $temp[3];\n" if ($temp[3]); - print FILE "\tfilename \"$temp[4]\";\n" if ($temp[4]); + print FILE "\tfilename \"" . &EscapeFilename($temp[4]) . "\";\n" if ($t= emp[4]); print FILE "\toption root-path \"$temp[5]\";\n" if ($temp[5]); print FILE "}\n"; $key++; @@ -1335,7 +1337,7 @@ sub buildconf { close FILE; if ( $dhcpsettings{"ENABLE_GREEN"} eq 'on' || $dhcpsettings{"ENABLE_BLUE= "} eq 'on' ) {system '/usr/local/bin/dhcpctrl enable >/dev/null 2>&1';} else {system '/usr/local/bin/dhcpctrl disable >/dev/null 2>&1';} - system '/usr/local/bin/dhcpctrl restart >/dev/null 2>&1'; + system '/usr/local/bin/dhcpctrl restart >/dev/null 2>&1 &'; } =20 # @@ -1392,3 +1394,12 @@ sub IsUsedNewOptionDefinition { } return 0; } + +sub EscapeFilename($) { + my $filename =3D shift; + + # Replace all single / by \/ + $filename =3D~ s/\//\\\//g; + + return $filename; +} diff --git a/html/cgi-bin/tor.cgi b/html/cgi-bin/tor.cgi index b17db01a2..71da66666 100644 --- a/html/cgi-bin/tor.cgi +++ b/html/cgi-bin/tor.cgi @@ -2,7 +2,7 @@ ############################################################################= ### # = # # IPFire.org - A linux based firewall = # -# Copyright (C) 2013 IPFire Team = # +# Copyright (C) 2013-2019 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 = # @@ -36,10 +36,10 @@ my @dummy =3D ( ${Header::colouryellow} ); undef (@dummy); =20 my @bandwidth_limits =3D ( - 1000 * 1024, # 1G + 1000 * 1024, # 1 GBit/s 500 * 1024, 200 * 1024, - 100 * 1024, # 100M + 100 * 1024, # 100 MBit/s 64 * 1024, 50 * 1024, 25 * 1024, @@ -49,10 +49,7 @@ my @bandwidth_limits =3D ( 8 * 1024, 4 * 1024, 2 * 1024, - 1024, # 1M - 512, - 256, - 160 + 1024 # 1 MBit/s ); my @accounting_periods =3D ('daily', 'weekly', 'monthly'); =20 diff --git a/lfs/tor b/lfs/tor index 4e38a3e7c..384b1b213 100644 --- a/lfs/tor +++ b/lfs/tor @@ -32,7 +32,7 @@ DL_FROM =3D $(URL_IPFIRE) DIR_APP =3D $(DIR_SRC)/$(THISAPP) TARGET =3D $(DIR_INFO)/$(THISAPP) PROG =3D tor -PAK_VER =3D 33 +PAK_VER =3D 34 =20 DEPS =3D "" =20 hooks/post-receive -- IPFire 2.x development tree --===============1386692570605832923==--