* [git.ipfire.org] IPFire 2.x development tree branch, master, updated. 933e27f1ab9cf0a114afa6c64af443d10ca132cf
@ 2026-12-01 17:20 Michael Tremer
0 siblings, 0 replies; only message in thread
From: Michael Tremer @ 2026-12-01 17:20 UTC (permalink / raw)
To: ipfire-scm
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, master has been updated
via 933e27f1ab9cf0a114afa6c64af443d10ca132cf (commit)
via fb69bf35455e312076fa53ef893c83060d954ed2 (commit)
via fdd6eceba8ececa15c582b659602e37251da8095 (commit)
from c574b21d0c028f1e066550203659fcfa607cb88c (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 933e27f1ab9cf0a114afa6c64af443d10ca132cf
Author: Michael Tremer <michael.tremer@ipfire.org>
Date: Tue Dec 1 16:37:57 2026 +0000
collectd-migrate.py: Create all data sources of the OpenVPN N2N databases
telemetryd collects the payload of the tunnel in addition to what has
been sent and received over the network, but collectd has not. The
migrated databases were missing these data sources until telemetryd has
written to them for the first time (which migrates them), and the graph
could not be rendered before that because rrdtool fails with an error
about the missing data source.
Fixes: #14962
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
commit fb69bf35455e312076fa53ef893c83060d954ed2
Author: Michael Tremer <michael.tremer@ipfire.org>
Date: Tue Dec 1 16:25:09 2026 +0000
red: Write the PPP secrets right before pppd is started
pppd 2.5.4 has started to refuse secrets that are not owned by root or
that can be accessed by the group or others. The web user interface was
writing them as nobody, so PPPoE connections could not be established.
The secrets are now written by the red script from the settings of the
current profile each time before pppd is started. This is also what
connectd needs when it switches to the backup profile, so that it does
not have to write them itself any more. The web user interface does not
write them any more.
Fixes: #14964
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
commit fdd6eceba8ececa15c582b659602e37251da8095
Author: Michael Tremer <michael.tremer@ipfire.org>
Date: Tue Dec 1 16:17:50 2026 +0000
core207: Migrate the status format of the OpenVPN RW server
The connection status and statistics are only read in the "version 3"
format since d63f6cadad, but existing systems still have the old format
in their server.conf until the settings are saved again. All clients
therefore showed up as disconnected without a graph.
The configuration is migrated and the server is restarted.
Fixes: #14963
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
-----------------------------------------------------------------------
Summary of changes:
config/rootfiles/core/207/filelists/files | 1 +
config/rootfiles/core/207/update.sh | 7 +++++++
config/telemetry/collectd-migrate.py | 5 +++++
html/cgi-bin/index.cgi | 11 +----------
html/cgi-bin/pppsetup.cgi | 21 +++------------------
src/initscripts/networking/red | 8 ++++++++
src/initscripts/system/connectd | 3 ---
7 files changed, 25 insertions(+), 31 deletions(-)
Difference in files:
diff --git a/config/rootfiles/core/207/filelists/files b/config/rootfiles/core/207/filelists/files
index f32d3c3c4a..6249307895 100644
--- a/config/rootfiles/core/207/filelists/files
+++ b/config/rootfiles/core/207/filelists/files
@@ -1,6 +1,7 @@
etc/httpd/conf/loadmodule.conf
etc/httpd/conf/vhosts.d/ipfire-interface-ssl.conf
etc/rc.d/init.d/apache
+etc/rc.d/init.d/connectd
etc/rc.d/init.d/firewall
etc/rc.d/init.d/functions
etc/rc.d/init.d/knot-resolver
diff --git a/config/rootfiles/core/207/update.sh b/config/rootfiles/core/207/update.sh
index fbe8ab18a3..76dd51dc17 100644
--- a/config/rootfiles/core/207/update.sh
+++ b/config/rootfiles/core/207/update.sh
@@ -588,6 +588,13 @@ fi
/etc/init.d/messagebus reload
/etc/init.d/telemetryd start
+# The status of the OpenVPN Roadwarrior server is now read in the "version 3"
+# format which is only written once the configuration has been regenerated
+if grep -q "^status-version 1" /var/ipfire/ovpn/server.conf 2>/dev/null; then
+ sed -i -e "s/^status-version 1\$/status-version 3/" /var/ipfire/ovpn/server.conf
+ /etc/init.d/openvpn-rw restart
+fi
+
# Restart Apache
/etc/init.d/apache restart
diff --git a/config/telemetry/collectd-migrate.py b/config/telemetry/collectd-migrate.py
index fa6321956f..f2845fecae 100644
--- a/config/telemetry/collectd-migrate.py
+++ b/config/telemetry/collectd-migrate.py
@@ -673,6 +673,11 @@ def main():
c.add_ds("rx_bytes", "DERIVE", min=0, source=path / "if_octets-traffic.rrd", source_field="rx")
c.add_ds("tx_bytes", "DERIVE", min=0, source=path / "if_octets-traffic.rrd", source_field="tx")
+ # collectd has not collected what has gone in and out of the tunnel, but
+ # telemetryd needs all data sources to be present to render the graph
+ c.add_ds("rx_payload", "DERIVE", min=0)
+ c.add_ds("tx_payload", "DERIVE", min=0)
+
# Write to disk
c.write("openvpn-n2n/%s.rrd" % name)
diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi
index 61a8b20338..8e9b5b08a4 100644
--- a/html/cgi-bin/index.cgi
+++ b/html/cgi-bin/index.cgi
@@ -108,7 +108,7 @@ if ($cgiparams{'ACTION'} eq _('Connect With Profile'))
"${General::swroot}/ppp/settings");
open (TMP, ">${General::swroot}/ppp/updatesettings");
close TMP;
- # read in the new params "early" so we can write secrets.
+ # read in the new params "early".
%cgiparams = ();
&General::readhash("${General::swroot}/ppp/settings", \%cgiparams);
$cgiparams{'PROFILE'} = $profile;
@@ -116,15 +116,6 @@ if ($cgiparams{'ACTION'} eq _('Connect With Profile'))
&General::writehash("${General::swroot}/ppp/settings-$cgiparams{'PROFILE'}",
\%cgiparams);
- # write secrets file.
- open(FILE, ">/${General::swroot}/ppp/secrets") or die "Unable to write secrets file.";
- flock(FILE, 2);
- my $username = $cgiparams{'USERNAME'};
- my $password = $cgiparams{'PASSWORD'};
- print FILE "'$username' * '$password'\n";
- chmod 0600, "${General::swroot}/ppp/secrets";
- close FILE;
-
&General::log("@{[ _('Profile Made Current:') ]} $tempcgiparams{'PROFILENAME'}");
$cgiparams{'ACTION'} = _('Connect');
}
diff --git a/html/cgi-bin/pppsetup.cgi b/html/cgi-bin/pppsetup.cgi
index cb573ec5b4..1319212afd 100644
--- a/html/cgi-bin/pppsetup.cgi
+++ b/html/cgi-bin/pppsetup.cgi
@@ -224,9 +224,8 @@ ERROR:
&General::writehash("${General::swroot}/ppp/settings-$pppsettings{'PROFILE'}",
\%pppsettings);
- # make link and write secret file.
+ # make link.
&updatesettings();
- &writesecrets();
&General::log("@{[ _('Profile Saved:') ]} $pppsettings{'PROFILENAME'}");
}
@@ -241,15 +240,13 @@ if ($pppsettings{'ACTION'} eq _('Select'))
# make link.
&updatesettings();
- # read in the new params "early" so we can write secrets.
+ # read in the new params "early".
%pppsettings = ();
&General::readhash("${General::swroot}/ppp/settings", \%pppsettings);
$pppsettings{'PROFILE'} = $profile;
&General::writehash("${General::swroot}/ppp/settings-$pppsettings{'PROFILE'}",
\%pppsettings);
- &writesecrets();
-
&General::log("@{[ _('Profile Made Current:') ]} $pppsettings{'PROFILENAME'}");
}
elsif ($pppsettings{'ACTION'} eq _('Delete'))
@@ -267,7 +264,7 @@ elsif ($pppsettings{'ACTION'} eq _('Delete'))
# make link.
&updatesettings();
- # read in the new params "early" so we can write secrets.
+ # read in the new params "early".
%pppsettings = ();
&General::readhash("${General::swroot}/ppp/settings", \%pppsettings);
$pppsettings{'PROFILE'} = $profile;
@@ -1002,18 +999,6 @@ sub updatesettings
close(FILE);
}
-sub writesecrets
-{
- # write secrets file.
- open(FILE, ">/${General::swroot}/ppp/secrets") or die "Unable to write secrets file.";
- flock(FILE, 2);
- my $username = $pppsettings{'USERNAME'};
- my $password = $pppsettings{'PASSWORD'};
- print FILE "'$username' * '$password'\n";
- chmod 0600, "${General::swroot}/ppp/secrets";
- close FILE;
-}
-
sub initprofile
{
$pppsettings{'PROFILENAME'} = _('Unnamed');
diff --git a/src/initscripts/networking/red b/src/initscripts/networking/red
index 06dc5361ba..165ed87278 100644
--- a/src/initscripts/networking/red
+++ b/src/initscripts/networking/red
@@ -470,6 +470,14 @@ case "${1}" in
METHOD=""
fi
+ ### Secrets
+ #
+ # pppd refuses to use the secrets if they are not owned by root or if
+ # they can be accessed by the group or others. Therefore they are
+ # written here and not by the web user interface.
+ rm -f /var/ipfire/ppp/secrets
+ (umask 077; echo "'${USERNAME}' * '${PASSWORD}'" > /var/ipfire/ppp/secrets)
+
### Run everything
#
if [ "$METHOD" == "PPPOE_PLUGIN" ]; then
diff --git a/src/initscripts/system/connectd b/src/initscripts/system/connectd
index d956c2847a..267ade4a4b 100644
--- a/src/initscripts/system/connectd
+++ b/src/initscripts/system/connectd
@@ -84,9 +84,6 @@ case "$1" in
rm -f /var/ipfire/ppp/settings
cp "/var/ipfire/ppp/settings-${BACKUPPROFILE}" /var/ipfire/ppp/settings
msg_log "Switched to backup profile ${BACKUPPROFILE}"
- # to be shure the right secrets are used
- eval $(/usr/local/bin/readhash /var/ipfire/ppp/settings-${BACKUPPROFILE})
- echo "'$USERNAME' * '$PASSWORD'" > /var/ipfire/ppp/secrets
else
msg_log "No backup profile given. Exiting."
exit 0
hooks/post-receive
--
IPFire 2.x development tree
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-01 17:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-01 17:20 [git.ipfire.org] IPFire 2.x development tree branch, master, updated. 933e27f1ab9cf0a114afa6c64af443d10ca132cf Michael Tremer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox