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 4jcrlV1lWFz2xQW for ; Sun, 29 Nov 2026 15:33:26 +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 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR1" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4jcrlV1NJgz2xBN for ; Sun, 29 Nov 2026 15:33:26 +0000 (UTC) Received: from people01.haj.ipfire.org (people01.haj.ipfire.org [IPv6:2001:678:b28::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 4jcrlT2kG5z5F5 for ; Sun, 29 Nov 2026 15:33:25 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1795966405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=GesWpXYOHxv3pICb2Gx01KkpvgJh58axBfZ1uXGKl74=; b=3mqhygcVohXKoYh0vb2cYwBkfQE8BdXyAr7dRRC7lqFt81pkoKE0h02LjAJsao9UmkxCi4 B/AZUaEwiCxcqKDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1795966405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc; bh=GesWpXYOHxv3pICb2Gx01KkpvgJh58axBfZ1uXGKl74=; b=iSNcviS79JNn2EYpvGJgAW5CUUCYx3MdAmKiHR/5kGCTt6YdN0MPOP1Lpd40iEgMKOyYBy FO289H7l28cQ0fDVAQqGcv4o7GuwhU4sEt1Iukt/s4sAE9BMoPAstkS2TmqtwLSDLG6LRT qGOn+okF3XGQ6DxlXE/aKi0af/RVrqFOiDkb2eRJaFoQ6kbz1+OeUtDbhYy5sWk7V8XwiM xn1ffvOmpxKQK6vLAV1l34SEl/R5pusKJhGEFIwE7GOTlvEUpDfYKGKBYrQfvWyL38tZQF dI8nUpsEV5xYBxq1uYCXTd7DqbyW0gSmin99oqzMCpq/tGygLE6V0WitgOmF6g== Received: by people01.haj.ipfire.org (Postfix, from userid 1000) id 4jcrlT0NSZz2xKy; Sun, 29 Nov 2026 15:33:25 +0000 (UTC) To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. a90be563d2bc23f32e385961e0e1c34fb14e2436 X-Git-Refname: refs/heads/next X-Git-Reftype: branch X-Git-Oldrev: 9cf1ac083d4dd56095416e67bb65b281f102a88b X-Git-Newrev: a90be563d2bc23f32e385961e0e1c34fb14e2436 Message-Id: <4jcrlT0NSZz2xKy@people01.haj.ipfire.org> Date: Sun, 29 Nov 2026 15:33:24 +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 a90be563d2bc23f32e385961e0e1c34fb14e2436 (commit) via 105f0cae415c1020504c39cf8aa31b04676e99fd (commit) from 9cf1ac083d4dd56095416e67bb65b281f102a88b (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 a90be563d2bc23f32e385961e0e1c34fb14e2436 Author: Matthias Fischer Date: Sat Nov 28 18:07:09 2026 +0100 summary.dat (logs.cgi): Added translation for 'lm_sensors output' Signed-off-by: Matthias Fischer commit 105f0cae415c1020504c39cf8aa31b04676e99fd Author: Michael Tremer Date: Sun Nov 29 14:57:40 2026 +0000 ovpnmain.cgi: Group the connections by their IP address pool again A single list of all connections ordered by their name makes it hard to see which connections belong to a pool, and when one of the pools does not work. This shows one table for each pool again: the dynamic pool first, then the static pools by their name and the N2N connections last. The title of each table has the name and the network of the pool. The Subnet column is gone because it would only repeat the title. Fixes: #13908 Signed-off-by: Michael Tremer ----------------------------------------------------------------------- Summary of changes: html/cgi-bin/logs.cgi/summary.dat | 1 + html/cgi-bin/ovpnmain.cgi | 267 ++++++++++++++++++++++---------------- 2 files changed, 157 insertions(+), 111 deletions(-) Difference in files: diff --git a/html/cgi-bin/logs.cgi/summary.dat b/html/cgi-bin/logs.cgi/summary.dat index e7ccae13ab..4622c5d695 100644 --- a/html/cgi-bin/logs.cgi/summary.dat +++ b/html/cgi-bin/logs.cgi/summary.dat @@ -143,6 +143,7 @@ my %sections = ( 'httpd' => _('HTTP Server'), 'init' => _('Init'), 'kernel' => _('Kernel and Firewall'), + 'lm_sensors output' => _('Sensors:'), 'modprobe' => _('Module Loader'), 'pam_unix' => _('Local User Logins'), 'sshd' => _('Remote User Logins'), diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index 4b8498f5df..f5dedb3ad5 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -4525,147 +4525,192 @@ if ($cgiparams{'TYPE'} eq 'net') { &Header::closebox(); &Header::openbox('100%', 'LEFT', _('Connection Status and -Control')); - my $table = UI::Table->new( - columns => [ - { title => _('Name'), row_header => 1 }, - { title => _('Type'), align => "center" }, - { title => _('Remark') }, - { title => _('Subnet'), align => "center" }, - { title => _('Status') }, - ], - legend => 0, - ); + # Load the static IP address pools + my %ccdconfhash = (); + &General::readhasharray("${General::swroot}/ovpn/ccd.conf", \%ccdconfhash); - foreach my $key (sort { ncmp ($confighash{$a}[1],$confighash{$b}[1]) } keys %confighash) { - my $status = $confighash{$key}[0]; - my $name = $confighash{$key}[1]; - my $type = $confighash{$key}[3]; + my %subnets = map { $ccdconfhash{$_}[0] => $ccdconfhash{$_}[1] } keys %ccdconfhash; - my %types = ( - 'host' => _('Host'), - 'net' => _('Net'), - ); + # Group the connections by the pool they get their address from + my %groups = (); - # Create some simple booleans to check the status - my $hasExpired = 0; - my $expiresSoon = 0; + foreach my $key (keys %confighash) { + my $pool = $confighash{$key}[32]; - # Fetch information about the certificate for non-N2N connections only - if ($confighash{$key}[3] ne 'net') { - my @cavalid = &General::system_output("/usr/bin/openssl", "x509", "-text", - "-in", "${General::swroot}/ovpn/certs/$confighash{$key}[1]cert.pem"); + # N2N connections do not use any pool, all others use the dynamic pool by default + if ($pool eq "") { + $pool = ($confighash{$key}[3] eq "net") ? "n2n" : "dynamic"; + } - my $expiryDate = 0; + push(@{ $groups{$pool} }, $key); + } - # Parse the certificate information - foreach my $line (@cavalid) { - if ($line =~ /Not After : (.*)[\n]/) { - $expiryDate = &Date::Parse::str2time($1); - last; - } - } + # Show the dynamic pool first, then the static pools and the N2N connections last + my @pools = ( + grep({ $_ eq "dynamic" } keys %groups), + sort({ ncmp($a, $b) } grep({ $_ ne "dynamic" && $_ ne "n2n" } keys %groups)), + grep({ $_ eq "n2n" } keys %groups), + ); - # Calculate the remaining time - my $remainingTime = $expiryDate - time(); + # Show an empty table if there are no connections + push(@pools, "") unless (@pools); - # Determine whether the certificate has already expired, or will so soon - $hasExpired = ($remainingTime <= 0); - $expiresSoon = ($remainingTime <= 30 * 24 * 3600); - } + my $table; - # Show the name of the connection - my $title = $name; + foreach my $pool (@pools) { + $table = UI::Table->new( + columns => [ + { title => _('Name'), row_header => 1 }, + { title => _('Type'), align => "center" }, + { title => _('Remark') }, + { title => _('Status') }, + ], + legend => 0, + ); - if ($hasExpired) { - $title .= " (" . _('Expired') . ")"; - } elsif ($expiresSoon) { - $title .= " (" . _('Expires Soon') . ")"; + my $heading = ""; + + if ($pool eq "dynamic") { + $heading = _('Dynamic OpenVPN IP Address Pool'); + $heading .= " ($vpnsettings{'DOVPN_SUBNET'})" if ($vpnsettings{'DOVPN_SUBNET'}); + } elsif ($pool eq "n2n") { + $heading = _('OpenVPN Net-to-Net'); + } elsif ($pool ne "") { + $heading = $pool; + $heading .= " ($subnets{$pool})" if ($subnets{$pool}); } - my $connstatus = "DISCONNECTED"; + foreach my $key (sort { ncmp ($confighash{$a}[1],$confighash{$b}[1]) } @{ $groups{$pool} || [] }) { + my $status = $confighash{$key}[0]; + my $name = $confighash{$key}[1]; + my $type = $confighash{$key}[3]; + + my %types = ( + 'host' => _('Host'), + 'net' => _('Net'), + ); - # Disabled Connections - if ($status eq "off") { - $connstatus = "DISABLED"; + # Create some simple booleans to check the status + my $hasExpired = 0; + my $expiresSoon = 0; - # N2N Connections - } elsif ($type eq "net") { - if (-e "/var/run/${name}n2n.pid") { - my $port = $confighash{$key}[22]; + # Fetch information about the certificate for non-N2N connections only + if ($confighash{$key}[3] ne 'net') { + my @cavalid = &General::system_output("/usr/bin/openssl", "x509", "-text", + "-in", "${General::swroot}/ovpn/certs/$confighash{$key}[1]cert.pem"); - if ($port ne "") { - $connstatus = &OpenVPN::n2n_status($port); + my $expiryDate = 0; + + # Parse the certificate information + foreach my $line (@cavalid) { + if ($line =~ /Not After : (.*)[\n]/) { + $expiryDate = &Date::Parse::str2time($1); + last; + } } + + # Calculate the remaining time + my $remainingTime = $expiryDate - time(); + + # Determine whether the certificate has already expired, or will so soon + $hasExpired = ($remainingTime <= 0); + $expiresSoon = ($remainingTime <= 30 * 24 * 3600); } - # RW Connections - } elsif ($type eq "host") { - if (grep { $_->{'Common Name'} eq $confighash{$key}[2] } @{ $status{'clients'} }) { - $connstatus = "CONNECTED"; + # Show the name of the connection + my $title = $name; + + if ($hasExpired) { + $title .= " (" . _('Expired') . ")"; + } elsif ($expiresSoon) { + $title .= " (" . _('Expires Soon') . ")"; } - } - my %states = ( - "DISABLED" => [ "is-disabled", _('DISCONNECTED') ], - "CONNECTED" => [ "is-connected", _('CONNECTED') ], - "DISCONNECTED" => [ "is-disconnected", _('DISCONNECTED') ], - ); + my $connstatus = "DISCONNECTED"; - my ($class, $state) = @{ $states{$connstatus} || [ "is-unknown", $connstatus ] }; + # Disabled Connections + if ($status eq "off") { + $connstatus = "DISABLED"; - # Link to the graph of this connection - my $graph = ""; + # N2N Connections + } elsif ($type eq "net") { + if (-e "/var/run/${name}n2n.pid") { + my $port = $confighash{$key}[22]; - if ($type eq "host") { - $graph = &Graphs::icon("OpenVPNClientThroughput", $confighash{$key}[2]); - } elsif ($type eq "net") { - $graph = &Graphs::icon("OpenVPNNetToNetThroughput", $confighash{$key}[1]); - } + if ($port ne "") { + $connstatus = &OpenVPN::n2n_status($port); + } + } - my @actions = ( - $graph ? { html => $graph } : undef, - { action => _('Download Client Configuration'), image => 'vpn', title => _('Download Client Configuration'), hidden => { KEY => $key } }, - ); + # RW Connections + } elsif ($type eq "host") { + if (grep { $_->{'Common Name'} eq $confighash{$key}[2] } @{ $status{'clients'} }) { + $connstatus = "CONNECTED"; + } + } - # Show Certificate - if ($confighash{$key}[4] eq 'cert') { - push(@actions, { action => _('Show File'), image => "info", title => _('Show File'), hidden => { KEY => $key } }); - } else { - push(@actions, undef); - } + my %states = ( + "DISABLED" => [ "is-disabled", _('DISCONNECTED') ], + "CONNECTED" => [ "is-connected", _('CONNECTED') ], + "DISCONNECTED" => [ "is-disconnected", _('DISCONNECTED') ], + ); - # Show OTP QR code - if ($confighash{$key}[43] eq 'on') { - push(@actions, { action => _('Show OTP QRCode'), image => 'qr-code', title => _('Show OTP QRCode'), hidden => { KEY => $key } }); - } else { - push(@actions, undef); - } + my ($class, $state) = @{ $states{$connstatus} || [ "is-unknown", $connstatus ] }; - # Download Certificate - if ($confighash{$key}[4] eq 'cert' && -f "${General::swroot}/ovpn/certs/$confighash{$key}[1].p12") { - push(@actions, { action => _('Download PKCS12 File'), image => "download", title => _('Download PKCS12 File'), hidden => { KEY => $key } }); - } elsif ($confighash{$key}[4] eq 'cert') { - push(@actions, { action => _('Download File'), image => "download", title => _('Download File'), hidden => { KEY => $key } }); - } else { - push(@actions, undef); - } + # Link to the graph of this connection + my $graph = ""; - push(@actions, - { action => _('Enable or Disable'), image => ($status eq 'on') ? "on" : "off", title => _('Enable or Disable'), hidden => { KEY => $key } }, - { action => _('Edit'), image => "edit", hidden => { KEY => $key } }, - { action => _('Remove'), image => "remove", hidden => { KEY => $key } }, - ); + if ($type eq "host") { + $graph = &Graphs::icon("OpenVPNClientThroughput", $confighash{$key}[2]); + } elsif ($type eq "net") { + $graph = &Graphs::icon("OpenVPNNetToNetThroughput", $confighash{$key}[1]); + } - $table->add_row([ - $title, - $types{$type}, - $confighash{$key}[25], - $confighash{$key}[32], - { text => $state, class => "status $class" }, - ], actions => \@actions, highlight => ($hasExpired || $expiresSoon)); - } + my @actions = ( + $graph ? { html => $graph } : undef, + { action => _('Download Client Configuration'), image => 'vpn', title => _('Download Client Configuration'), hidden => { KEY => $key } }, + ); - print $table->render(); + # Show Certificate + if ($confighash{$key}[4] eq 'cert') { + push(@actions, { action => _('Show File'), image => "info", title => _('Show File'), hidden => { KEY => $key } }); + } else { + push(@actions, undef); + } + + # Show OTP QR code + if ($confighash{$key}[43] eq 'on') { + push(@actions, { action => _('Show OTP QRCode'), image => 'qr-code', title => _('Show OTP QRCode'), hidden => { KEY => $key } }); + } else { + push(@actions, undef); + } + + # Download Certificate + if ($confighash{$key}[4] eq 'cert' && -f "${General::swroot}/ovpn/certs/$confighash{$key}[1].p12") { + push(@actions, { action => _('Download PKCS12 File'), image => "download", title => _('Download PKCS12 File'), hidden => { KEY => $key } }); + } elsif ($confighash{$key}[4] eq 'cert') { + push(@actions, { action => _('Download File'), image => "download", title => _('Download File'), hidden => { KEY => $key } }); + } else { + push(@actions, undef); + } + + push(@actions, + { action => _('Enable or Disable'), image => ($status eq 'on') ? "on" : "off", title => _('Enable or Disable'), hidden => { KEY => $key } }, + { action => _('Edit'), image => "edit", hidden => { KEY => $key } }, + { action => _('Remove'), image => "remove", hidden => { KEY => $key } }, + ); + + $table->add_row([ + $title, + $types{$type}, + $confighash{$key}[25], + { text => $state, class => "status $class" }, + ], actions => \@actions, highlight => ($hasExpired || $expiresSoon)); + } + + print "

" . &Header::escape($heading) . "

\n" if ($heading); + print $table->render(); + } # Show controls print UI::Form::button_bar( hooks/post-receive -- IPFire 2.x development tree