From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4jf7vN2kZWz2xcs for ; Tue, 01 Dec 2026 17:59:44 +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) (Client CN "mail01.haj.ipfire.org", Issuer "YR1" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4jf7vK5pbFz2xZB for ; Tue, 01 Dec 2026 17:59:41 +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) (Client CN "people01.haj.ipfire.org", Issuer "YE1" (not verified)) by mail01.ipfire.org (Postfix) with ESMTPS id 4jf7vJ6Vx8z5QT for ; Tue, 01 Dec 2026 17:59:40 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1796147980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=rZM8Edpk0/VsMCWLhzzO0o/qGV8TvyjJWdr3IP9wHlE=; b=z95xk4828ZsA+jyPfvh9N3C3oNmK2XY6AfR6lKHyXrDuZJi0GhGwzd8Gr7QmbBW5+78IVH 7AwZOKpBZYO63+Dg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1796147980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=rZM8Edpk0/VsMCWLhzzO0o/qGV8TvyjJWdr3IP9wHlE=; b=miN0gu1U+SICLo7+fkQeZOXGQwUBe6u3D75RgNqnXDJaW4dEaCoYiUlWjYmNeH06IDsDIr FxBZq8P1gq1nv6kDPF6Wlxyo/DiqniOHTiVqJNUP/IPtu/G6dh/0NzhWI5Z5NcY9YUl03k Vo4z+NSEmY7PbhrpthHutScAesGrGUUUmWIARdc9R71lwK/JfhMYHdMEWVbR9dsDwOXj0f 7qYfvfkMAjBtIDtoTxm3dVbSclYoxyjE1yEmII88AFePqNJOjQht5Cwi9P6+e7qHtnkb78 qot52XjJ6QviRCVP5y5Oz4iYLaKyZlnFuX6aaEcuU9S1jHFPadZGhdUXEDqtyw== Received: by people01.haj.ipfire.org (Postfix, from userid 1000) id 4jf7vJ5yg7z2xlt; Tue, 01 Dec 2026 17:59:40 +0000 (UTC) To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. 5919e63e27cd7b6462bff637f0dd98e639c86f4f X-Git-Refname: refs/heads/next X-Git-Reftype: branch X-Git-Oldrev: b679d0a3b4454b3563dac9cfacf659eaca50fb72 X-Git-Newrev: 5919e63e27cd7b6462bff637f0dd98e639c86f4f Message-Id: <4jf7vJ5yg7z2xlt@people01.haj.ipfire.org> Date: Tue, 01 Dec 2026 17:59:40 +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 5919e63e27cd7b6462bff637f0dd98e639c86f4f (commit) via 98a0c2d18796815f1bd41186693bd38ad69698c9 (commit) via f1f7e1629e8dc0c3868ddfc578c3bd4babe82e81 (commit) via ba03ea60817f28fc31ee9fe33690f3dcc130b87a (commit) via 052996cff73095a3b6cf18cb239ef88ff91a5864 (commit) from b679d0a3b4454b3563dac9cfacf659eaca50fb72 (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 5919e63e27cd7b6462bff637f0dd98e639c86f4f Author: Michael Tremer Date: Tue Dec 1 17:48:20 2026 +0000 telemetry: Update to snapshot 467953a * Databases are being migrated before graphs are rendered. Graphs of databases that were missing data sources (for example the OpenVPN net-to-net connections that have been migrated from collectd) could not be rendered until something was written to them * The labels of the vertical axis of graphs are spaced by the height of the text, and there is more room below the title * The minimum and maximum lines of the CPU frequency graph are thinner * The translations have been updated Fixes: #14962 Fixes: #14967 Signed-off-by: Michael Tremer commit 98a0c2d18796815f1bd41186693bd38ad69698c9 Author: Antonio Quartulli Date: Tue Dec 1 15:31:53 2026 +0100 http-client-functions.pl: Use the address ddns publishes for the sync check GetDyndnsRedIP() only fetched the public address if "Fetch the public IP" was selected and RED was in RFC1918 or the shared address space. ddns uses it whenever fetching is selected, and when RED can't be reached from the Internet, e.g. in 169.254.0.0/16, so the web interface showed those hosts as out of sync. With RED behind a router, the page now fetches the address like ddns does. Bug: #14766 Signed-off-by: Antonio Quartulli Signed-off-by: Michael Tremer commit f1f7e1629e8dc0c3868ddfc578c3bd4babe82e81 Author: Antonio Quartulli Date: Tue Dec 1 15:31:52 2026 +0100 ddns.cgi: Get the address of the DDNS hosts only when needed GetDyndnsRedIP() can fetch the public address from a server, which was done on every page load, even without any enabled host. Signed-off-by: Antonio Quartulli Signed-off-by: Michael Tremer commit ba03ea60817f28fc31ee9fe33690f3dcc130b87a Author: Antonio Quartulli Date: Tue Dec 1 15:31:51 2026 +0100 wio.cgi: Get the address of the DDNS hosts only once GetDyndnsRedIP() can fetch the public address from a server, which was done for each enabled host. Signed-off-by: Antonio Quartulli Signed-off-by: Michael Tremer commit 052996cff73095a3b6cf18cb239ef88ff91a5864 Author: Antonio Quartulli Date: Tue Dec 1 15:31:50 2026 +0100 network-functions.pl: Add ip_address_is_global() Returns whether an IPv4 address can be reached from the Internet, based on the IANA special-purpose address registry. Signed-off-by: Antonio Quartulli Signed-off-by: Michael Tremer ----------------------------------------------------------------------- Summary of changes: config/cfgroot/http-client-functions.pl | 26 ++++++++++---------------- config/cfgroot/network-functions.pl | 29 +++++++++++++++++++++++++++++ html/cgi-bin/ddns.cgi | 6 ++++-- html/cgi-bin/wio.cgi | 6 +++++- lfs/telemetry | 4 ++-- 5 files changed, 50 insertions(+), 21 deletions(-) Difference in files: diff --git a/config/cfgroot/http-client-functions.pl b/config/cfgroot/http-client-functions.pl index aefad7639..6a0a0fa4d 100644 --- a/config/cfgroot/http-client-functions.pl +++ b/config/cfgroot/http-client-functions.pl @@ -313,7 +313,7 @@ sub FetchPublicIp { } # -# This sub returns the red IP used to compare in DyndnsServiceSync +# This sub returns the address that ddns publishes, to compare in DyndnsServiceSync # sub GetDyndnsRedIP { my %settings; @@ -322,21 +322,15 @@ sub GetDyndnsRedIP { &General::readhash("${General::swroot}/ddns/settings", \%settings); # Try to grab the address from the local-ipaddress file. - my $ip = &Network::grab_address_from_file("${General::swroot}/red/local-ipaddress") or return 'unavailable'; - - # 100.64.0.0/10 is reserved for dual-stack lite (http://tools.ietf.org/html/rfc6598). - if (&Network::ip_address_in_network($ip, "10.0.0.0/255.0.0.0") || - &Network::ip_address_in_network($ip, "172.16.0.0/255.240.0.0") || - &Network::ip_address_in_network($ip, "192.168.0.0/255.255.0.0") || - &Network::ip_address_in_network($ip, "100.64.0.0/255.192.0.0")) - { - if ($settings{'BEHINDROUTER'} eq 'FETCH_IP') { - # Call function to omit the real address. - my $RealIP = &FetchPublicIp; - - # Check if the grabbed address is valid. - $ip = (&Network::check_ip_address ($RealIP) ? $RealIP : 'unavailable'); - } + my $ip = &Network::grab_address_from_file("${General::swroot}/red/local-ipaddress"); + + # Like ddns, use the public address if asked to, or if RED is unknown or + # can't be reached from the Internet + if ($settings{'BEHINDROUTER'} eq 'FETCH_IP' || !&Network::ip_address_is_global($ip)) { + my $RealIP = &FetchPublicIp; + + # Check if the grabbed address is valid. + $ip = (&Network::check_ip_address ($RealIP) ? $RealIP : 'unavailable'); } return $ip; diff --git a/config/cfgroot/network-functions.pl b/config/cfgroot/network-functions.pl index a90655305..9f37c490f 100644 --- a/config/cfgroot/network-functions.pl +++ b/config/cfgroot/network-functions.pl @@ -425,6 +425,23 @@ sub ip_address_in_range($$) { return (($ipaddress_bin >= $ipstart_bin) && ($ipaddress_bin <= $ipend_bin)); } +# Returns true if the IPv4 address can be reached from the Internet, i.e. it +# isn't in any of the special-purpose ranges that aren't globally reachable +# (based on the IANA registry). +sub ip_address_is_global($) { + my $address = shift; + + return 0 unless (&check_ip_address($address)); + + foreach my $network ("0.0.0.0/8", "10.0.0.0/8", "100.64.0.0/10", "127.0.0.0/8", + "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24", "192.0.2.0/24", "192.168.0.0/16", + "198.18.0.0/15", "198.51.100.0/24", "203.0.113.0/24", "240.0.0.0/4") { + return 0 if (&ip_address_in_network($address, $network)); + } + + return 1; +} + sub check_port { $_ = $_[0]; @@ -1022,6 +1039,18 @@ sub testsuite() { $result = &ip_address_in_range("192.168.30.21", "192.168.30.10", "192.168.30.20"); assert('ip_address_in_range("192.168.30.21", "192.168.30.10", "192.168.30.20")', !$result); + # Check &ip_address_is_global() + foreach my $address ("81.3.27.37", "8.8.8.8", "1.0.0.0", "100.63.255.255", "100.128.0.0", + "169.253.255.255", "172.15.255.255", "172.32.0.0", "224.0.0.1", "239.255.255.255") { + assert("ip_address_is_global(\"$address\")", &ip_address_is_global($address)); + } + + foreach my $address ("10.1.2.3", "172.16.0.0", "172.31.255.255", "192.168.1.1", "100.64.0.0", + "100.127.255.255", "127.0.0.1", "169.254.0.0", "169.254.255.255", "0.255.255.255", + "192.0.2.1", "198.18.0.1", "240.0.0.0", "255.255.255.255", "a.b.c.d", "") { + assert("!ip_address_is_global(\"$address\")", !&ip_address_is_global($address)); + } + # Check &get_prefix() $result = &get_prefix("192.168.0.0/24"); assert('get_prefix("192.168.0.0/24")', $result == 24); diff --git a/html/cgi-bin/ddns.cgi b/html/cgi-bin/ddns.cgi index e5fe7166f..2c075a4c8 100644 --- a/html/cgi-bin/ddns.cgi +++ b/html/cgi-bin/ddns.cgi @@ -445,8 +445,9 @@ print $form->render(); -e $datafile or die "Unable to open $datafile."; @current = &General::read_file($datafile, { keep_newlines => 1 }); -# Get IP address of the red interface. -my $ip = &HTTPClient::GetDyndnsRedIP(); +# The address of the hosts, which may have to be fetched from a server: only +# get it when needed +my $ip; my $id = 0; my $toggle_enabled; @@ -484,6 +485,7 @@ if (@current) { $fqdn =~ s/^[\*\@]\.//; if (&Network::check_fqdn($fqdn)) { + $ip //= &HTTPClient::GetDyndnsRedIP(); $sync = (&HTTPClient::DyndnsServiceSync ($ip,$temp[1], $temp[2]) ? "has-text-success" : "has-text-danger"); } diff --git a/html/cgi-bin/wio.cgi b/html/cgi-bin/wio.cgi index 35e8ff041..8a229c92b 100755 --- a/html/cgi-bin/wio.cgi +++ b/html/cgi-bin/wio.cgi @@ -1030,6 +1030,9 @@ my @dyndnsnames = (); if ( -s "$dyndnsconfig" ) { @ddns = &General::read_file($dyndnsconfig); + # May have to be fetched from a server: only do it once + my $ddnsip; + foreach (@ddns) { chomp; @temp = split (/\,/, $_); @@ -1037,7 +1040,8 @@ if ( -s "$dyndnsconfig" ) { my $class = "has-text-info"; if ( $temp[7] eq "on" ) { - $class = ( &HTTPClient::DyndnsServiceSync (&HTTPClient::GetDyndnsRedIP,$temp[1],$temp[2]) ? "has-text-success" : "has-text-danger" ); + $ddnsip //= &HTTPClient::GetDyndnsRedIP(); + $class = ( &HTTPClient::DyndnsServiceSync ($ddnsip,$temp[1],$temp[2]) ? "has-text-success" : "has-text-danger" ); } push(@dyndnsnames, "@{[ &Header::escape($temp[1]) ]}.@{[ &Header::escape($temp[2]) ]}"); diff --git a/lfs/telemetry b/lfs/telemetry index 44a53136c..b056143d6 100644 --- a/lfs/telemetry +++ b/lfs/telemetry @@ -25,7 +25,7 @@ include Config # This is a development snapshot (there is no release, yet) -VER = 0.99.0-git20261031-5189d70 +VER = 0.99.0-git20261201-467953a THISAPP = telemetry-$(VER) DL_FILE = $(THISAPP).tar.xz @@ -41,7 +41,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_BLAKE2 = a2ca6114e8e5b176cd33074abf84b76a20f04bf4356496c1b5e95bd8cfad4ed14b0245a0957dfd1acec87fa44a2ed1a3dfe7a0f165ba43802258e2d4ee05bb16 +$(DL_FILE)_BLAKE2 = 84e0d18c213232e846de96e8b2459026d587c0dd0e6e39e781abb2fbbda5271fbc91c0848112af72bd6a3e6fb8c1ec1d03b08f5b272606bfa86e23d6e8d73df2 install : $(TARGET) hooks/post-receive -- IPFire 2.x development tree