commit c87cf4153fb27609744213f222c348fa1609ce9e Author: Michael Tremer Date: Thu Oct 8 20:13:06 2026 +0000 kernel: Enable LSX and LASX on loongarch64 The kernel has been built without support for the Loongson SIMD Extension (LSX) and the Loongson Advanced SIMD Extension (LASX). It did not save and restore the vector registers, did not announce them to the userland and could not use them itself. Processors that don't have them are not affected, because the kernel checks at runtime what is there. Signed-off-by: Michael Tremer commit e753736607d10c88ab403ddc58e9e15d61687d93 Author: Michael Tremer Date: Thu Oct 8 18:24:45 2026 +0000 perl-File-ReadBackwards: Move from package into main system pakfire.cgi is using this module to read the messages of the last Pakfire run from the end of the log file. As it has only been available as a package that was installed together with proxy-accounting, the page would not have loaded on any other system. Signed-off-by: Michael Tremer commit ce2ba3fa84d9705567a1f8d936be5f2e4d436c27 Merge: 3cbaad5cf aa7193e77 Author: Michael Tremer Date: Thu Oct 8 18:22:33 2026 +0000 Merge branch 'webif-cleanup' into next commit aa7193e7724294b50386ff09e66e11bc41480f19 Author: Michael Tremer Date: Thu Oct 8 17:01:35 2026 +0000 header.pl: Show that the system is connecting when pppd is running When the system is not connected, but is supposed to keep the connection up, the connection status has only been showing that the system is connecting when pppd was not running, and that it is idle when pppd was running. This check has been the wrong way around, because system() returns zero when the command was successful. Signed-off-by: Michael Tremer commit ff2fe5ee56b3c7b1ed5ef3a5148153700c7db65d Author: Michael Tremer Date: Thu Oct 8 16:50:35 2026 +0000 web-user-interface: Don't launch commands in a shell A couple of pages have been putting variables into a command line which was then executed by a shell. Those commands are now being launched directly with their arguments passed as a list. iostat has been called three times on the media page, once for each column that is being shown. It is now being called only once. The connection tracking table has been piped through sort, which is now being done in Perl. Signed-off-by: Michael Tremer commit 1e4ae8110b3ada2abf40145666cd3f5ebddd06f7 Author: Michael Tremer Date: Thu Oct 8 16:50:35 2026 +0000 wio.cgi: Don't launch wioscan in a shell When a network is being scanned, the name of the device and the range of IP addresses have been put into a command line which was executed by a shell. The page reads its CGI parameters into the hash that holds the network settings, too. Therefore a request seems to be able to change the name of the device and to have any shell commands executed as the user of the web server. wioscan is now being launched directly with its arguments passed as a list. Signed-off-by: Michael Tremer commit c1902fb7bb8f6bdac7eff7f442f475c57ca54862 Author: Michael Tremer Date: Thu Oct 8 16:45:43 2026 +0000 web-user-interface: Don't launch a shell for trivial things There is no need to launch a shell to create or to empty a file, to find out the release or the architecture of the kernel, or to remove files and to change their permissions. The URL filter has been launching chmod for each file of a blacklist when setting the permissions, which is now being done without launching any processes. It is still calling cp to copy directories, but no longer in a shell. Signed-off-by: Michael Tremer commit 3faec56c17517138ba58d0602bb89393c4d671cf Author: Michael Tremer Date: Thu Oct 8 16:45:42 2026 +0000 wio.pl: Fix command injection when a single client is being checked After a single client has been checked, its line in the list of clients has been replaced by calling sed in a shell command which had all fields of the client passed to it. This includes the remark, which can be freely chosen by the user and only has its commas escaped. Therefore it has been possible to execute any shell commands by adding a client with a remark that contains a single quote and by checking it afterwards. As the web user interface launches wio.pl using wiohelper, which is setuid, those commands have been executed as root. The line is now being replaced without calling any commands and by comparing the entire line instead of matching it as a regular expression. Signed-off-by: Michael Tremer commit 62acf4e28bc1cbfa1c0d55b5573630dc929d2078 Author: Michael Tremer Date: Thu Oct 8 16:45:42 2026 +0000 wio.cgi: Fix command injection when changing the sort order The table of clients can be sorted by clicking on the header of a column which passes the name of the column as query string. Anything that started with IPADR or HOST has been accepted and was then passed to sed in a shell command to change the configuration file. Therefore it has been possible to execute any shell commands as the user of the web server by sending a request like: wio.cgi?IPADR';;' The query string must now be exactly IPADR or HOST and the configuration file is being changed without calling any commands. Signed-off-by: Michael Tremer commit 718d92446ec653438ef328307d45481f65ff4baa Author: Michael Tremer Date: Thu Oct 8 16:41:55 2026 +0000 web-user-interface: Don't call ps or pidof to find processes Who Is Online?, Pakfire and the connection status in the header have been launching ps or pidof to find out whether a process is running. They are now calling General::find_pids() which searches for the process in /proc. The Update Accelerator has been searching the output of ps for the command line of a download. It now reads the command lines from /proc and matches the same expressions against them. The check for pppd in the connection status shows that the system is connecting when pppd is not running. This looks like it is the wrong way around, but has been left like it was. Signed-off-by: Michael Tremer commit 94177b67dc1dcf8c12c89fcb67288e08f13e12d1 Author: Michael Tremer Date: Thu Oct 8 16:36:31 2026 +0000 web-user-interface: Don't launch a shell to read files A couple of pages have been calling cat, grep, tail, awk or cut in a shell to read from a file. The files are now being read directly. The page that shows the status of ATM modems has been launching three shells for each attribute. Attributes that have multiple lines have been shown once for each of their lines and are now only being shown once. The configuration of the Samba shares has been split into its sections by calling tail and head for each section. This did not work if the file was not terminated with a newline character. Pakfire now uses File::ReadBackwards to find the log messages of its last run, which is still reading the log file from its end. Who Is Online? now reads the status of OpenVPN and the PID files without calling cat or awk and searches for the remarks of the connections in the configuration that it has already read. Signed-off-by: Michael Tremer commit f25d800dee0446a6148feb7f02b562eed51a1f14 Author: Michael Tremer Date: Thu Oct 8 16:29:20 2026 +0000 web-user-interface: Don't launch a shell to list files Many pages have been calling ls or find in a shell to find out which graphs, backups or devices are available. This is now being done with glob() which does not launch any other processes. The check for S.M.A.R.T. errors on the home page has also been calling cut and grep for each disk. The files are now being read directly. When listing the backups of add-ons, only files that end with .ipf are being considered now. Before, the last five characters have been cut off any file in the directory. Graphs::getprocesses() has only been calling ls, too, but is not being used anywhere and has therefore been dropped. Signed-off-by: Michael Tremer commit 6cc12f9a24a47b4d0209daa18bf0f1727300a78d Author: Michael Tremer Date: Thu Oct 8 16:20:08 2026 +0000 header.pl: Don't call /bin/cat to read the menu The menu has been put together by launching a shell that ran /bin/cat on all menu files and by evaluating all of its output at once. The files are now being read without launching any other processes and are being evaluated one after the other. That way, a broken file from an add-on no longer removes the entire menu, and any errors are being logged. The menu files remain pieces of Perl code which rely on the variables of genmenu() and can therefore not be loaded in any other way. Signed-off-by: Michael Tremer commit cd7ff279c50d1b94ce10477b7bdbc3a23be78dde Author: Michael Tremer Date: Thu Oct 8 16:12:02 2026 +0000 web-user-interface: Format all sizes with format_bytes() formatBytes() has been renamed to format_bytes() and is now being used in all places that have been printing sizes in bytes, kilobytes or megabytes which is hard to read for large values. This covers the list of backups, the memory and media pages, the Update Accelerator, the repository of the URL filter and the status page of Squid Accounting. Tor had its own copy of the function, which has been dropped. The units have been removed from the labels and from their translations as they are now a part of the value. On the Update Accelerator page, the total cache size has been summed up on top of the size of the last pending download. The counter is now being reset first. Signed-off-by: Michael Tremer commit 0c24ec9cd610dc986641214b6a686352f06ee9bd Author: Michael Tremer Date: Wed Oct 7 15:04:59 2026 +0000 guardian, tor, wio: Bump release The CGIs of these packages have been calling functions that have been removed from general-functions.pl and header.pl. Signed-off-by: Michael Tremer commit 9ed829a4a0b4ca667053b988ac554b72fb08f544 Author: Michael Tremer Date: Wed Oct 7 15:04:59 2026 +0000 core205: Ship the cleaned up network functions The old network functions have been removed from general-functions.pl and header.pl, and some more functions have been moved to where they belong. All libraries and scripts that have been changed need to be shipped together with the web user interface, which is already part of this update. Signed-off-by: Michael Tremer commit 54dd632effbee8f32dbfac580c216818fdc5a9ec Author: Michael Tremer Date: Wed Oct 7 15:02:43 2026 +0000 firewalllog.dat: Move generateProtoTransHash() here The function is only being called by this page to translate the numbers of the protocols in the firewall log into their names. Signed-off-by: Michael Tremer commit 5162be0312391357bf133b8ae39b0fd1af7aa5ad Author: Michael Tremer Date: Wed Oct 7 15:01:54 2026 +0000 Drop protocols.pl This file has a static copy of /etc/protocols, but it is not being installed and nothing has been loading it. Signed-off-by: Michael Tremer commit 4acc62b0fe0f152b6771b164e0e13c4596f932a1 Author: Michael Tremer Date: Wed Oct 7 15:00:15 2026 +0000 dhcp.cgi: Move the functions that show the leases here CheckSortOrder(), PrintActualLeases() and leasesort() have only been called by this page, but have been part of header.pl. They have been using their own copy of the DHCP settings which has only been loaded when the sort order has been changed. Therefore the list has only been sorted right after one of the column headers was clicked, but no longer when the page was loaded again. They are now using the settings of the page, so that the list always remains sorted. The variables are now being declared, because this page is using strict, and header.pl no longer needs Time::Local. Signed-off-by: Michael Tremer commit 81f7420413ab4334b7817cfa64ac41618a828486 Author: Michael Tremer Date: Wed Oct 7 14:58:04 2026 +0000 location-functions.pl: Move validcc() here The function validates a country code and is only being used when a location group is being edited. Signed-off-by: Michael Tremer commit f7d2648b7582d5c929f0fd0d95577d141fbefbac Author: Michael Tremer Date: Wed Oct 7 14:57:29 2026 +0000 http-client-functions.pl: Move DyndnsServiceSync() here The function compares what a hostname resolves to with the IP address that is being returned by GetDyndnsRedIP() which is already here. Signed-off-by: Michael Tremer commit 6d6be4f984840c08983f143a48b555babfa4f017 Author: Michael Tremer Date: Wed Oct 7 14:57:29 2026 +0000 http-client-functions.pl: Move MakeUserAgent() here The function is only being used to send HTTP requests and comes with GetCoreUpdateVersion() which is not being called from anywhere else. ipblocklist-functions.pl is using its own HTTP client and now has to load http-client-functions.pl to compose the user agent. Signed-off-by: Michael Tremer commit 36bacc44d7b154126bf0cd52dac7e6af5bff2372 Author: Michael Tremer Date: Wed Oct 7 14:53:49 2026 +0000 network-functions.pl: Don't pass disabled aliases to the firewall get_aliases() has added all aliases to the hash that is being used by the firewall and the IPsec page, no matter whether they have been enabled or not. Therefore they could be selected although the system does not have that IP address. Aliases that are disabled or invalid are now being skipped. They are still being counted, so that the names of aliases without a remark don't change. Firewall rules that are using a disabled alias as source or destination no longer match anything, and NAT rules are falling back to the default IP address of the RED interface. Signed-off-by: Michael Tremer commit 193537e3a297cb7577126b57b8249a476ae87f1d Author: Michael Tremer Date: Wed Oct 7 14:52:04 2026 +0000 network-functions.pl: Merge the two get_aliases() functions There has been a second function in ids-functions.pl which has read the same file, but returned a list of the addresses of all aliases that are enabled instead of filling a hash for the firewall. Network::get_aliases() now does both. It returns the list and still fills the hash if one is being passed, so that nothing changes for the firewall which refers to aliases without a name by their position. Signed-off-by: Michael Tremer commit 097a4764d4c254097873631f9ae2a7d019afe4f2 Author: Michael Tremer Date: Wed Oct 7 14:48:59 2026 +0000 network-functions.pl: Move get_aliases() here This function reads the aliases of the RED interface and is being used by the firewall. Signed-off-by: Michael Tremer commit 105af434b4f78edd60cf77aec74d8348fe509e39 Author: Michael Tremer Date: Wed Oct 7 14:48:59 2026 +0000 network-functions.pl: Move get_nameservers() here This function returns the configured DNS servers and is only being called by the IDS functions. Signed-off-by: Michael Tremer commit 356f002c0a3e05b0adeff97f2d6f7351fbb5938c Author: Michael Tremer Date: Wed Oct 7 14:48:59 2026 +0000 network-functions.pl: Move grab_address_from_file() here This function reads an IP address from a file and is being used outside of the web user interface. Signed-off-by: Michael Tremer commit 1a173651223112e0ed1aff1318e2364cbf0df9fa Author: Michael Tremer Date: Wed Oct 7 14:48:09 2026 +0000 network-functions.pl: Move validfqdn() here The function is now called check_fqdn(). Signed-off-by: Michael Tremer commit 29d74edc30ffe2ab789c7d47a58fa04ecb30813b Author: Michael Tremer Date: Wed Oct 7 14:48:09 2026 +0000 network-functions.pl: Move validdomainname() and validwildcarddomainname() here The functions are now called check_domainname() and check_wildcard_domainname(). Signed-off-by: Michael Tremer commit d4136952bd452e9f6993e8e3555b356b6349a9b1 Author: Michael Tremer Date: Wed Oct 7 14:48:09 2026 +0000 network-functions.pl: Move validhostname() here The function is now called check_hostname(). Signed-off-by: Michael Tremer commit 69889e5a7592666b8c4ccb64134ff97a51c4b25d Author: Michael Tremer Date: Wed Oct 7 14:48:09 2026 +0000 network-functions.pl: Move validport() here The function is now called check_port() like the other functions that are validating input. validportrange() remains where it is, because it returns translated error messages for the web user interface. Signed-off-by: Michael Tremer commit ffc5ccca6533cc0447592009a14622d24cc41254 Author: Michael Tremer Date: Wed Oct 7 14:48:08 2026 +0000 general-functions.pl: Drop unused functions validproxyport(), GetIcmpDescription(), read_file_utf8() and write_file_utf8() are not being called from anywhere. Signed-off-by: Michael Tremer commit 5b6f3f9e6a3f610540dc6bd0fd5b2bb81fb266a3 Author: Michael Tremer Date: Wed Oct 7 14:45:26 2026 +0000 general-functions.pl: Drop the remaining old network functions IpInSubnet(), getnetworkip(), subtocidr(), cidrtosub(), iporsubtodec() and iporsubtocidr() are no longer being called from anywhere. checksubnets() and check_net_internal_range() have been the last users and are now calling the functions in network-functions.pl. Signed-off-by: Michael Tremer commit 6150e93e727bc3763241930312ff0b26ff3ef6c4 Author: Michael Tremer Date: Wed Oct 7 14:45:26 2026 +0000 Use the functions in network-functions.pl to match and convert subnets General::IpInSubnet() and General::getnetworkip() have only been wrappers around Network::ip_address_in_network() and Network::get_netaddress() which are now being called directly. Both take the netmask as well as the prefix, so that there is no need to convert it using General::iporsubtodec() before. Where a netmask or a prefix is needed, General::iporsubtodec() and iporsubtocidr() are replaced by Network::get_netmask() and Network::get_prefix() which are returning undef for invalid input instead of "3". Signed-off-by: Michael Tremer commit dbd0210a65ea2fa99c783b4ebc73a30362b2a0cf Author: Michael Tremer Date: Wed Oct 7 14:44:57 2026 +0000 Don't call General::subtocidr() and General::cidrtosub() any more These have only been wrappers around Network::convert_netmask2prefix() and Network::convert_prefix2netmask(). Signed-off-by: Michael Tremer commit b079df5d28c34db72f5018a2a5c8e43b3d81cea1 Author: Michael Tremer Date: Wed Oct 7 14:44:57 2026 +0000 general-functions.pl: Drop validipandmask() This is replaced by Network::check_subnet(). Unlike the old function, it accepts networks that start with a zero like 0.0.0.0/0, and it no longer accepts leading zeroes in the address or the prefix. Signed-off-by: Michael Tremer commit 23fc567092ea90bb812d663875147b01e32d3c01 Author: Michael Tremer Date: Wed Oct 7 14:44:56 2026 +0000 general-functions.pl: Drop validip() This is replaced by Network::check_ip_address() which does not accept an IP address that is followed by a newline. Signed-off-by: Michael Tremer commit 8cca14f598d69f0b7ee94797b80f3b3fe213560c Author: Michael Tremer Date: Wed Oct 7 14:44:56 2026 +0000 general-functions.pl: Drop validmask() This has only been a wrapper around Network::check_netmask() and Network::check_prefix(). Signed-off-by: Michael Tremer commit 737953bb6721dd2d0c81b3f998b43eeb0dac0248 Author: Michael Tremer Date: Wed Oct 7 14:44:56 2026 +0000 general-functions.pl: Drop validipormask() The callers are now checking for an IP address or a subnet using Network::check_ip_address() and Network::check_subnet(). Signed-off-by: Michael Tremer commit 0a10289996d41498ae79136dc0a8a237ccc33f6f Author: Michael Tremer Date: Wed Oct 7 14:44:56 2026 +0000 general-functions.pl: Drop ip2dec() and dec2ip() These have only been wrappers around Network::ip2bin() and Network::bin2ip(). Signed-off-by: Michael Tremer commit 174367f08f30b149f4cd8a5b96c4d6431cc1a2cf Author: Michael Tremer Date: Wed Oct 7 14:44:56 2026 +0000 general-functions.pl: Drop validmac() This is replaced by Network::valid_mac(). Signed-off-by: Michael Tremer commit 7c77bd5f547979f9222f068578d7bc17bad09a2c Author: Michael Tremer Date: Wed Oct 7 14:44:56 2026 +0000 header.pl: Drop orange_used() and blue_used() Network::is_zone_available() does the same and can be used outside of the web user interface. green_used() remains, because it checks whether a device has been assigned, which is_zone_available() does not do. Signed-off-by: Michael Tremer commit f7436a62372ca001d378ede9bc98946fe142f49c Author: Michael Tremer Date: Wed Oct 7 14:44:55 2026 +0000 network-functions.pl: Move RedIsWireless() here The function is now called is_red_wireless() like the other functions that are checking the configuration of the zones. Signed-off-by: Michael Tremer commit 4e7261ef9852e8b0e4b95cc9d61f7e9ccd989224 Author: Michael Tremer Date: Wed Oct 7 14:44:55 2026 +0000 network-functions.pl: Move get_red_interface() here This function has nothing to do with the web user interface and has already been called by Network::get_red_interfaces(). Signed-off-by: Michael Tremer commit 889d3458e22dbcfaf7c485ee9b9b431777fac1c4 Author: Michael Tremer Date: Wed Oct 7 14:44:48 2026 +0000 http-client-functions.pl: Fix typo in the RFC1918 check There has been a trailing dot after 172.16.0.0 which is not a valid IP address. Therefore 172.16.0.0/12 has never been considered private. Signed-off-by: Michael Tremer commit a54f1c7511de3b5a23f47aa485f76ccc6535df8b Author: Michael Tremer Date: Wed Oct 7 14:44:48 2026 +0000 network-functions.pl: Fix the prototype of is_zone_available() The function takes the name of the zone, but has been declared to take no arguments at all. Signed-off-by: Michael Tremer commit 7fa0027e1f9fb4ce2791cbdb9bb1d4bcf45b378f Author: Michael Tremer Date: Wed Oct 7 14:44:48 2026 +0000 network-functions.pl: Fix the assertions for get_prefix() The testsuite has been checking that the function does not return the correct prefix. Signed-off-by: Michael Tremer commit cee814148e7c7ec06248de59b054f5579a51edd6 Author: Michael Tremer Date: Wed Oct 7 14:44:48 2026 +0000 network-functions.pl: Fix network_equal() never returning true The function checked whether the scalars $bin1 and $bin2 were defined, but the results of network2bin() are stored in the arrays @bin1 and @bin2. Those scalars never exist, so the function always returned undef. Therefore General::check_net_internal_exact() has never found a network that is equal to one of the local zones, which is what the routing and firewall groups pages rely on. The assertion in the testsuite has expected the wrong result, too. Signed-off-by: Michael Tremer commit 3cbaad5cf20704b534a4a97fc7fba3328c577996 Author: Michael Tremer Date: Wed Oct 7 17:06:28 2026 +0000 bird: Fix build on loongarch64 Signed-off-by: Michael Tremer commit 3096d4c2b716f9412897347ac6cf8ef02697b9b0 Author: Michael Tremer Date: Wed Oct 7 13:39:47 2026 +0000 make.sh: Don't support special rootfiles for packages any more This fails because we cannot expand a non-existant directory. Since there are no rootfiles left any more, we can drop the second expression. Signed-off-by: Michael Tremer