From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4bVYxF4vp1z2xph for ; Sun, 29 Jun 2025 16:03:29 +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 RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R10" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4bVYxF4f22z2xh0 for ; Sun, 29 Jun 2025 16:03:29 +0000 (UTC) Received: from people01.haj.ipfire.org (people01.haj.ipfire.org [172.28.1.161]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "people01.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4bVYxD4Pm9zdN for ; Sun, 29 Jun 2025 16:03:28 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1751213008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=2ubZDLwVv7goN28aYUMnBhkyPY6BzGX6R9kSgl+hic4=; b=vwWonOqt6fzBC0sXG+GeVZmik4Nx9tEAPmraXD2Dz/nqQBxaYdo7PPZ8TXWk/GCiwoGUCj VE7KOxKxdFIb1jBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1751213008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=2ubZDLwVv7goN28aYUMnBhkyPY6BzGX6R9kSgl+hic4=; b=eYO64RZGtXQyxee8lBP/sptb9e4CORd+dKm9GEYVr0Ok0fg4Y52VgwKVDSjiXmlAYmVJZM 2ewp1c1UHL7mUEWSeVsY9no+5/JjHPWbVwsk8Vw9NI5I84W0L/miREadO6N7MhfVG2vssf D6Wh+LrSQ6HQ4c5zPQFH/QNY14R/PkQr9OmZzw0yDexX3igVlCqPOZ9+0zeNT+cnAqO4go pPM8NyR+D3e+NBJoj1qzCC8bOu5eAZylhF2qQI8Gg4h7fj29KjDsQJ/+Nvysa694qU9Qf2 xDblLWfc2IM9jju2QTNcEDybA0CIhD118uTgH6oQ9h/HvBHKPDIYpd9eGXJfrg== Received: by people01.haj.ipfire.org (Postfix, from userid 1000) id 4bVYxD1Jz2z2xRC; Sun, 29 Jun 2025 16:03:28 +0000 (UTC) To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 2c40362e9c34101082ae5c5ecfcf42eeffb5967a X-Git-Refname: refs/heads/next X-Git-Reftype: branch X-Git-Oldrev: c1d2c40d30a80981a499ba9260aedb8160b8ba13 X-Git-Newrev: 2c40362e9c34101082ae5c5ecfcf42eeffb5967a Message-Id: <4bVYxD1Jz2z2xRC@people01.haj.ipfire.org> Date: Sun, 29 Jun 2025 16:03:27 +0000 (UTC) From: Michael Tremer Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: 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 2c40362e9c34101082ae5c5ecfcf42eeffb5967a (commit) via 58199a11c0651acbd3f9d92de8e04f8cbc9907e1 (commit) via 798556ec29207d5131a7600d5489f1ee92a7b87a (commit) via 61b277aa9c578a9a69e552f593a8bde421b811bc (commit) via ca811a746a79f0e02cfb780cbd4543a057131e3a (commit) via 5511d94ed0d8ea6fd372d52cba515b4d6726abed (commit) via 97ec94159acc1de68e804c70efd5e8e534e2e0a7 (commit) via da9987bf97ef88bf93d27ebdbe13558e5a2c76d9 (commit) via 3bc224d7203c014f637369bfb43850679c3cf571 (commit) via 2a39f4af1a0a2641c9a10fc96183a9d245c386a1 (commit) via 2527b86ee85ebe89d585f4fb1db2aac0c1026684 (commit) via d6a8e1a887977071d2dfbaeb2b9095571a6889d5 (commit) via 61d78100dc1b7b217bd7aa443b28ced2c711dd70 (commit) via e86bab0246ae7d23b978452a9b0cf2e835149edc (commit) from c1d2c40d30a80981a499ba9260aedb8160b8ba13 (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 2c40362e9c34101082ae5c5ecfcf42eeffb5967a Author: Michael Tremer Date: Sun Jun 29 16:03:14 2025 +0000 core196: Ship fwhosts.cgi Signed-off-by: Michael Tremer commit 58199a11c0651acbd3f9d92de8e04f8cbc9907e1 Author: Michael Tremer Date: Mon Jun 23 17:16:58 2025 +0000 langs: Remove the unused "Unused" translation string Signed-off-by: Michael Tremer commit 798556ec29207d5131a7600d5489f1ee92a7b87a Author: Michael Tremer Date: Mon Jun 23 17:16:57 2025 +0000 fwhosts.cgi: Move the tooltip into the usage counter This will clutter the page less as we don't have any good icon sets. Signed-off-by: Michael Tremer Tested-by: Adolf Belka Signed-off-by: Michael Tremer commit 61b277aa9c578a9a69e552f593a8bde421b811bc Author: Michael Tremer Date: Mon Jun 23 17:16:56 2025 +0000 fwhosts.cgi: Don't show anything if a host/group is unused Signed-off-by: Michael Tremer commit ca811a746a79f0e02cfb780cbd4543a057131e3a Author: Michael Tremer Date: Mon Jun 23 17:16:55 2025 +0000 fwhosts.cgi: Remove whitespace issues Signed-off-by: Michael Tremer commit 5511d94ed0d8ea6fd372d52cba515b4d6726abed Author: Peer Dietzmann Date: Mon Jun 23 17:16:54 2025 +0000 fwhosts.cgi: Show in which firewall rule objects are being used Signed-off-by: Michael Tremer Tested-by: Adolf Belka Signed-off-by: Michael Tremer commit 97ec94159acc1de68e804c70efd5e8e534e2e0a7 Author: Adolf Belka Date: Sat Jun 28 15:48:53 2025 +0200 core196: Ship pakfire Signed-off-by: Adolf Belka Signed-off-by: Michael Tremer commit da9987bf97ef88bf93d27ebdbe13558e5a2c76d9 Author: Adolf Belka Date: Sat Jun 28 15:48:52 2025 +0200 update.sh: Remove pakfire.log file as it is not used Signed-off-by: Adolf Belka Signed-off-by: Michael Tremer commit 3bc224d7203c014f637369bfb43850679c3cf571 Author: Adolf Belka Date: Sat Jun 28 15:48:51 2025 +0200 backup.pl: Stop restore of the empty pakfire.log file - With the removal of the pakfire.log file from the install, this patch stops the empty file being restored from old backups Signed-off-by: Adolf Belka Signed-off-by: Michael Tremer commit 2a39f4af1a0a2641c9a10fc96183a9d245c386a1 Author: Adolf Belka Date: Sat Jun 28 15:48:50 2025 +0200 pakfire: Remove creation of pakfire.log that is never used Signed-off-by: Adolf Belka Signed-off-by: Michael Tremer commit 2527b86ee85ebe89d585f4fb1db2aac0c1026684 Author: Adolf Belka Date: Sat Jun 28 15:48:49 2025 +0200 functions.pl: pakfir cleanup - I wondered what was supposed to be in the pakfire.log file that has always been empty so I had a look around and discovered that it has been commented out since CU30 - So this patch removes that commented out line and the other patches in this set remove the creation of the empty pakfire.log file and stop it being restored etc Signed-off-by: Adolf Belka Signed-off-by: Michael Tremer commit d6a8e1a887977071d2dfbaeb2b9095571a6889d5 Author: Adolf Belka Date: Fri Jun 27 21:53:51 2025 +0200 core196: Ship libloc Signed-off-by: Adolf Belka Signed-off-by: Michael Tremer commit 61d78100dc1b7b217bd7aa443b28ced2c711dd70 Author: Adolf Belka Date: Fri Jun 27 21:53:50 2025 +0200 libloc: Fixes bug13861 - libloc-0.9.18 fails to find some ASN info - Patch added to fix bactracking after no match found bug. When the next version of libloc is released then this patch can be removed as the patch will be integrated in with that version. - Update of rootfile not required. - Tested out on local build of libloc-0.9.18 Fixes: bug13861 Reported-by: Adolf Belka Suggested-by: Michael Tremer Tested-by: Adolf Belka Signed-off-by: Adolf Belka Signed-off-by: Michael Tremer commit e86bab0246ae7d23b978452a9b0cf2e835149edc Author: Michael Tremer Date: Sun Jun 29 16:00:21 2025 +0000 core196: Ship the WireGuard initscript This is required because the changes from 8e1a9a3699e7061405ae7ee49caf672558a1c792 were not shipped in the final release of c195. Signed-off-by: Michael Tremer ----------------------------------------------------------------------- Summary of changes: config/backup/backup.pl | 5 + config/rootfiles/common/pakfire | 1 - config/rootfiles/core/196/filelists/files | 2 + .../{oldcore/148 => core/196}/filelists/libloc | 0 .../{oldcore/167 => core/196}/filelists/pakfire | 0 config/rootfiles/core/196/update.sh | 3 +- html/cgi-bin/fwhosts.cgi | 332 ++++++++++++++++++++- lfs/libloc | 1 + lfs/pakfire | 5 +- src/pakfire/lib/functions.pl | 3 +- ...no_match_was_found_at_the_end_of_the_tree.patch | 31 ++ 11 files changed, 367 insertions(+), 16 deletions(-) copy config/rootfiles/{oldcore/148 => core/196}/filelists/libloc (100%) copy config/rootfiles/{oldcore/167 => core/196}/filelists/pakfire (100%) create mode 100644 src/patches/libloc-0.9.18_Fix_backtracking_after_no_match_was_found_at_the_end_of_the_tree.patch Difference in files: diff --git a/config/backup/backup.pl b/config/backup/backup.pl index 0b8272266..fe62213e8 100644 --- a/config/backup/backup.pl +++ b/config/backup/backup.pl @@ -345,6 +345,11 @@ restore_backup() { /usr/local/bin/ipsecctrl S fi + if [ -e /var/log/pakfire.log ]; then + rm /var/log/pakfire.log + fi + + return 0 } diff --git a/config/rootfiles/common/pakfire b/config/rootfiles/common/pakfire index b2a10cf37..8fe0f09a4 100644 --- a/config/rootfiles/common/pakfire +++ b/config/rootfiles/common/pakfire @@ -17,4 +17,3 @@ opt/pakfire/pakfire opt/pakfire/tmp var/cache/pakfire var/log/pakfire -var/log/pakfire.log diff --git a/config/rootfiles/core/196/filelists/files b/config/rootfiles/core/196/filelists/files index 60ebd2c7f..d760f7190 100644 --- a/config/rootfiles/core/196/filelists/files +++ b/config/rootfiles/core/196/filelists/files @@ -1,5 +1,7 @@ etc/rc.d/init.d/networking/red +etc/rc.d/init.d/wireguard srv/web/ipfire/cgi-bin/firewall.cgi +srv/web/ipfire/cgi-bin/fwhosts.cgi srv/web/ipfire/cgi-bin/index.cgi srv/web/ipfire/cgi-bin/netexternal.cgi srv/web/ipfire/cgi-bin/netovpnsrv.cgi diff --git a/config/rootfiles/core/196/filelists/libloc b/config/rootfiles/core/196/filelists/libloc new file mode 120000 index 000000000..ff4a92429 --- /dev/null +++ b/config/rootfiles/core/196/filelists/libloc @@ -0,0 +1 @@ +../../../common/libloc \ No newline at end of file diff --git a/config/rootfiles/core/196/filelists/pakfire b/config/rootfiles/core/196/filelists/pakfire new file mode 120000 index 000000000..d5b1d0d03 --- /dev/null +++ b/config/rootfiles/core/196/filelists/pakfire @@ -0,0 +1 @@ +../../../common/pakfire \ No newline at end of file diff --git a/config/rootfiles/core/196/update.sh b/config/rootfiles/core/196/update.sh index 3b2485f9c..ac5e5baac 100644 --- a/config/rootfiles/core/196/update.sh +++ b/config/rootfiles/core/196/update.sh @@ -92,7 +92,8 @@ rm -rfv \ /usr/bin/genisoimage \ /usr/bin/mkhybrid \ /usr/lib/librols.so.* \ - /usr/lib/libusual.so.* + /usr/lib/libusual.so.* \ + /var/log/pakfire.log # Extract files extract_files diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index e92ef6853..953f81e5f 100644 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -1952,7 +1952,8 @@ END } my $colnet="$customnetwork{$key}[1]/".&General::subtocidr($customnetwork{$key}[2]); my $netcount=&getnetcount($customnetwork{$key}[0]); - print"
$customnetwork{$key}[0]".&getcolor($colnet)."$customnetwork{$key}[3]$netcount x"; + my $netusedin=&getusedin($customnetwork{$key}[0]); + print"$customnetwork{$key}[0]".&getcolor($colnet)."$customnetwork{$key}[3]$netcount x"; print< @@ -2106,8 +2107,10 @@ END $customhost{$key}[4]=~s/\s+//g; my $hostcount=0; $hostcount=&gethostcount($customhost{$key}[0]); - print"$customhost{$key}[0]".&getcolor($ip)."$customhost{$key}[3]$hostcount x"; - print<$customhost{$key}[0]$color$customhost{$key}[3]$hostcount x @@ -2182,7 +2185,8 @@ sub viewtablegrp print "
$grpname   "; print " $Lang::tr{'remark'}:  $remark   " if ($remark ne ''); my $netgrpcount=&getnetcount($grpname); - print "$Lang::tr{'used'}: $netgrpcount x"; + my $groupusedin=&getusedin($grpname); + print "$Lang::tr{'used'}: $netgrpcount x"; if($netgrpcount == '0') { print""; @@ -2320,8 +2324,8 @@ sub viewtablelocationgrp # Get group count. my $locationgrpcount=&getlocationcount($grpname); - print "$Lang::tr{'used'}: $locationgrpcount x"; - + my $locationusedin=&getlocusedin($grpname); + print "$Lang::tr{'used'}: $locationgrpcount x"; # Only display delete icon, if the group is not used by a firewall rule. if($locationgrpcount == '0') { print"
\n"; @@ -2463,10 +2467,11 @@ END END #Neuer count $srvcount=&getsrvcount($customservice{$key}[0]); + my $serviceusedin=&getsrvusedin($customservice{$key}[0]); if($customservice{$key}[3] eq 'All ICMP-Types'){print $Lang::tr{'fwdfw all icmp'};} elsif($customservice{$key}[3] ne 'BLANK'){print $customservice{$key}[3];} print<$srvcount x + $srvcount x @@ -2538,7 +2543,8 @@ sub viewtableservicegrp if($count >0){print"";$count=1;} print "
$grpname    "; print "$Lang::tr{'remark'}:  $remark " if ($remark ne ''); - print "  $Lang::tr{'used'}: $grpcount x"; + my $srvgrpusedin=&getsrvusedin($customservicegrp{$key}[0]); + print "  $Lang::tr{'used'}: $grpcount x"; if($grpcount == '0') { print""; @@ -2811,6 +2817,106 @@ sub getlocationcount } return $counter; } +sub getlocusedin +{ + my $groupname=shift; + my $titletext=""; + + # Location groups are stored as "group:groupname" in the + # firewall settings files. + my $searchstring = join(':', "group",$groupname); + + #Count services used in firewall - config + my $fwfwtext=""; + # first set title if found + foreach my $key1 (keys %fwfwd) { + if($fwfwd{$key1}[4] eq $searchstring){ + $fwfwtext = "$Lang::tr{'firewall rules'}:"; + } + if($fwfwd{$key1}[6] eq $searchstring){ + $fwfwtext = "$Lang::tr{'firewall rules'}:"; + } + } + # then add rule numbers + my @fwfwrules = (); + foreach my $key1 (keys %fwfwd) { + if($fwfwd{$key1}[4] eq $searchstring){ + push(@fwfwrules, $key1); + } + if($fwfwd{$key1}[6] eq $searchstring){ + push(@fwfwrules, $key1); + } + } + my @fwfwarraysorted = sort { $a <=> $b } @fwfwrules; + foreach my $rule (@fwfwarraysorted) + { + $fwfwtext .= " - $rule"; + } + #Count services used in firewall - input + my $fwintext=""; + foreach my $key2 (keys %fwinp) { + if($fwinp{$key2}[4] eq $searchstring){ + $fwintext = "$Lang::tr{'incoming firewall access'}:"; + } + if($fwinp{$key2}[6] eq $searchstring){ + $fwintext = "$Lang::tr{'incoming firewall access'}:"; + } + } + my @fwinrules = (); + foreach my $key2 (keys %fwinp) { + if($fwinp{$key2}[4] eq $searchstring){ + push(@fwinrules, $key2); + } + if($fwinp{$key2}[6] eq $searchstring){ + push(@fwinrules, $key2); + } + } + my @fwinarraysorted = sort { $a <=> $b } @fwinrules; + foreach my $rule (@fwinarraysorted) + { + $fwintext .= " - $rule"; + } + #Count services used in firewall - outgoing + my $fwouttext=""; + foreach my $key3 (keys %fwout) { + if($fwout{$key3}[4] eq $searchstring){ + $fwouttext = "$Lang::tr{'outgoing firewall access'}:"; + } + if($fwout{$key3}[6] eq $searchstring){ + $fwouttext = "$Lang::tr{'outgoing firewall access'}:"; + } + } + my @fwoutrules = (); + foreach my $key3 (keys %fwout) { + if($fwout{$key3}[4] eq $searchstring){ + push(@fwoutrules, $key3); + } + if($fwout{$key3}[6] eq $searchstring){ + push(@fwoutrules, $key3); + } + } + my @fwoutarraysorted = sort { $a <=> $b } @fwoutrules; + foreach my $rule (@fwoutarraysorted) + { + $fwouttext .= " - $rule"; + } + if ($fwfwtext) { + $titletext .= "$fwfwtext" + } + if ($fwintext) { + if ($titletext) { + $titletext .= " " + } + $titletext .= "$fwintext" + } + if ($fwouttext) { + if ($titletext) { + $titletext .= " " + } + $titletext .= "$fwouttext" + } + return $titletext; +} sub getnetcount { my $searchstring=shift; @@ -2850,6 +2956,122 @@ sub getnetcount } return $srvcounter; } +sub getusedin +{ + my $searchstring=shift; + my $titletext=""; + my $groups=(); + my $rules=(); + + #Count services used in Network/Host group + my $servicegrouptext=""; + foreach my $key (keys %customgrp) { + if($customgrp{$key}[2] eq $searchstring){ + $servicegrouptext = "$Lang::tr{'fwhost cust grp'}:"; + } + } + foreach my $key (keys %customgrp) { + if($customgrp{$key}[2] eq $searchstring){ + $servicegrouptext .= " - $customgrp{$key}[0]"; + } + } + #Count services used in firewall - config + my $fwfwtext=""; + # first set title if found + foreach my $key1 (keys %fwfwd) { + if($fwfwd{$key1}[4] eq $searchstring){ + $fwfwtext = "$Lang::tr{'firewall rules'}:"; + } + if($fwfwd{$key1}[6] eq $searchstring){ + $fwfwtext = "$Lang::tr{'firewall rules'}:"; + } + } + # then add rule numbers + my @fwfwrules = (); + foreach my $key1 (keys %fwfwd) { + if($fwfwd{$key1}[4] eq $searchstring){ + push(@fwfwrules, $key1); + } + if($fwfwd{$key1}[6] eq $searchstring){ + push(@fwfwrules, $key1); + } + } + my @fwfwarraysorted = sort { $a <=> $b } @fwfwrules; + foreach my $rule (@fwfwarraysorted) + { + $fwfwtext .= " - $rule"; + } + #Count services used in firewall - input + my $fwintext=""; + foreach my $key2 (keys %fwinp) { + if($fwinp{$key2}[4] eq $searchstring){ + $fwintext = "$Lang::tr{'incoming firewall access'}:"; + } + if($fwinp{$key2}[6] eq $searchstring){ + $fwintext = "$Lang::tr{'incoming firewall access'}:"; + } + } + my @fwinrules = (); + foreach my $key2 (keys %fwinp) { + if($fwinp{$key2}[4] eq $searchstring){ + push(@fwinrules, $key2); + } + if($fwinp{$key2}[6] eq $searchstring){ + push(@fwinrules, $key2); + } + } + my @fwinarraysorted = sort { $a <=> $b } @fwinrules; + foreach my $rule (@fwinarraysorted) + { + $fwintext .= " - $rule"; + } + #Count services used in firewall - outgoing + my $fwouttext=""; + foreach my $key3 (keys %fwout) { + if($fwout{$key3}[4] eq $searchstring){ + $fwouttext = "$Lang::tr{'outgoing firewall access'}:"; + } + if($fwout{$key3}[6] eq $searchstring){ + $fwouttext = "$Lang::tr{'outgoing firewall access'}:"; + } + } + my @fwoutrules = (); + foreach my $key3 (keys %fwout) { + if($fwout{$key3}[4] eq $searchstring){ + push(@fwoutrules, $key3); + } + if($fwout{$key3}[6] eq $searchstring){ + push(@fwoutrules, $key3); + } + } + my @fwoutarraysorted = sort { $a <=> $b } @fwoutrules; + foreach my $rule (@fwoutarraysorted) + { + $fwouttext .= " - $rule"; + } + if ($servicegrouptext) { + $titletext .= "$servicegrouptext" + } + if ($fwfwtext) { + if ($titletext) { + $titletext .= " " + } + $titletext .= "$fwfwtext" + } + if ($fwintext) { + if ($titletext) { + $titletext .= " " + } + $titletext .= "$fwintext" + } + if ($fwouttext) { + if ($titletext) { + $titletext .= " " + } + $titletext .= "$fwouttext" + } + return $titletext +} sub getsrvcount { my $searchstring=shift; @@ -2880,6 +3102,100 @@ sub getsrvcount } return $srvcounter; } +sub getsrvusedin +{ + my $searchstring=shift; + my $titletext=""; + #Count services used in servicegroups + my $servicegrouptext=""; + foreach my $key (keys %customservicegrp) { + if($customservicegrp{$key}[2] eq $searchstring){ + $servicegrouptext = "$Lang::tr{'outgoing firewall access'}:"; + } + } + foreach my $key (keys %customservicegrp) { + if($customservicegrp{$key}[2] eq $searchstring){ + $servicegrouptext .= " - $customservicegrp{$key}[0]"; + } + } + my $fwfwtext=""; + # first set title if found + foreach my $key1 (keys %fwfwd) { + if($fwfwd{$key1}[15] eq $searchstring){ + $fwfwtext = "$Lang::tr{'firewall rules'}:"; + } + } + # then add rule numbers + my @fwfwrules = (); + foreach my $key1 (keys %fwfwd) { + if($fwfwd{$key1}[15] eq $searchstring){ + push(@fwfwrules, $key1); + } + } + my @fwfwarraysorted = sort { $a <=> $b } @fwfwrules; + foreach my $rule (@fwfwarraysorted) + { + $fwfwtext .= " - $rule"; + } + #Count services used in firewall - input + my $fwintext=""; + foreach my $key2 (keys %fwinp) { + if($fwinp{$key2}[15] eq $searchstring){ + $fwintext = "$Lang::tr{'incoming firewall access'}:"; + } + } + my @fwinrules = (); + foreach my $key2 (keys %fwinp) { + if($fwinp{$key2}[15] eq $searchstring){ + push(@fwinrules, $key2); + } + } + my @fwinarraysorted = sort { $a <=> $b } @fwinrules; + foreach my $rule (@fwinarraysorted) + { + $fwintext .= " - $rule"; + } + #Count services used in firewall - outgoing + my $fwouttext=""; + foreach my $key3 (keys %fwout) { + if($fwout{$key3}[15] eq $searchstring){ + $fwouttext = "$Lang::tr{'outgoing firewall access'}:"; + } + } + my @fwoutrules = (); + foreach my $key3 (keys %fwout) { + if($fwout{$key3}[15] eq $searchstring){ + push(@fwoutrules, $key3); + } + } + my @fwoutarraysorted = sort { $a <=> $b } @fwoutrules; + foreach my $rule (@fwoutarraysorted) + { + $fwouttext .= " - $rule"; + } + if ($servicegrouptext ne '') { + $titletext .= "$servicegrouptext"; + } + if ($fwfwtext ne '') { + if ($titletext) { + $titletext .= " "; + } + $titletext .= "$fwfwtext"; + } + if ($fwintext ne '') { + if ($titletext) { + $titletext .= " "; + } + $titletext .= "$fwintext"; + } + if ($fwouttext) { + if ($titletext ne '') { + $titletext .= " "; + } + $titletext .= "$fwouttext"; + } + return $titletext +} sub deletefromgrp { my $target=shift; diff --git a/lfs/libloc b/lfs/libloc index f2f0aa8a9..e9bbe16ba 100644 --- a/lfs/libloc +++ b/lfs/libloc @@ -82,6 +82,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) # https://lists.ipfire.org/pipermail/development/2022-November/014763.html cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libloc-0.9.18-Revert-Install-Perl-files-to-Perl-vendor-directory.patch cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libloc-0.9.18_gettext-0.25_fix.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libloc-0.9.18_Fix_backtracking_after_no_match_was_found_at_the_end_of_the_tree.patch cd $(DIR_APP) && ./autogen.sh cd $(DIR_APP) && ./configure \ --prefix=/usr \ diff --git a/lfs/pakfire b/lfs/pakfire index da7a648c8..2e75f7f68 100644 --- a/lfs/pakfire +++ b/lfs/pakfire @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2023 IPFire Team # +# Copyright (C) 2007-2025 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 # @@ -58,9 +58,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) > $(DIR_APP)/etc/pakfire.conf chown root.root $(DIR_APP) -R chmod 755 $(DIR_APP)/pakfire - touch /var/log/pakfire.log - chown root.nobody /var/log/pakfire.log - chmod 644 /var/log/pakfire.log ln -sf ../../var/log/pakfire /opt/pakfire/logs ln -sf ../../var/cache/pakfire /opt/pakfire/cache @$(POSTBUILD) diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index 2f172c398..e2c646313 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2022 IPFire Team # +# Copyright (C) 2007-2025 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 # @@ -105,7 +105,6 @@ sub message { sub logger { my $log = shift; if ($log) { - #system("echo \"`date`: $log\" >> /var/log/pakfire.log"); system("logger -t pakfire \"$log\""); } } diff --git a/src/patches/libloc-0.9.18_Fix_backtracking_after_no_match_was_found_at_the_end_of_the_tree.patch b/src/patches/libloc-0.9.18_Fix_backtracking_after_no_match_was_found_at_the_end_of_the_tree.patch new file mode 100644 index 000000000..6ac9acf3c --- /dev/null +++ b/src/patches/libloc-0.9.18_Fix_backtracking_after_no_match_was_found_at_the_end_of_the_tree.patch @@ -0,0 +1,31 @@ +X-Git-Url: http://git.ipfire.org/?p=location%2Flibloc.git;a=blobdiff_plain;f=src%2Fdatabase.c;h=c251061cc8a254879491ebe133b1b4f3b58ddf30;hp=0c8608542aaad6e82c4d8602bbeb388ab43225bb;hb=95d271bb90b4cebe81c288a95a2336aa63bac4d7;hpb=d1120513a30de43308d9ed848f7ef3c6ede6d767 + +diff --git a/src/database.c b/src/database.c +index 0c86085..c251061 100644 +--- a/src/database.c ++++ b/src/database.c +@@ -907,13 +907,7 @@ static int __loc_database_lookup(struct loc_database* db, const struct in6_addr* + + // Move on to the next node + r = __loc_database_lookup(db, address, network, network_address, node_index, level + 1); +- +- // End here if a result was found +- if (r == 0) +- return r; +- +- // Raise any errors +- else if (r < 0) ++ if (r < 0) + return r; + + DEBUG(db->ctx, "No match found below level %u\n", level); +@@ -922,7 +916,7 @@ static int __loc_database_lookup(struct loc_database* db, const struct in6_addr* + } + + // If this node has a leaf, we will check if it matches +- if (__loc_database_node_is_leaf(node_v1)) { ++ if (!*network && __loc_database_node_is_leaf(node_v1)) { + r = __loc_database_lookup_handle_leaf(db, address, network, network_address, level, node_v1); + if (r < 0) + return r; + hooks/post-receive -- IPFire 2.x development tree