[3/4] connections.cgi: Fix importing Wireguard peers

Message ID 20241206164417.3840426-3-michael.tremer@ipfire.org
State New
Headers
Series [1/4] connections.cgi: Fix colour of destination country |

Commit Message

Michael Tremer Dec. 6, 2024, 4:44 p.m. UTC
  Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 html/cgi-bin/connections.cgi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/html/cgi-bin/connections.cgi b/html/cgi-bin/connections.cgi
index 705118576..7286f9b46 100644
--- a/html/cgi-bin/connections.cgi
+++ b/html/cgi-bin/connections.cgi
@@ -116,13 +116,13 @@  if (-e "/var/ipfire/wireguard/peers") {
 	&General::readhasharray("/var/ipfire/wireguard/peers", \%wgpeers);
 
 	foreach my $key (keys %wgpeers) {
-		my $networks = $wgpeers{$key}[6];
+		my $networks = $wgpeers{$key}[8];
 
 		# Split the string
 		my @networks = split(/\|/, $networks);
 
 		foreach my $network (@networks) {
-			$networks[$network] = ${Header::colourwg};
+			$networks{$network} = ${Header::colourwg};
 		}
 	}
 }