From 0d241960201088fea9eeae80eee06555a724a03f Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 22 Nov 2024 13:34:35 +0100 Subject: [PATCH] wireguard.cgi: Fix fetching connection status with multiple interfaces Signed-off-by: Michael Tremer --- html/cgi-bin/wireguard.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/html/cgi-bin/wireguard.cgi b/html/cgi-bin/wireguard.cgi index eb7511d6b..5f3168473 100644 --- a/html/cgi-bin/wireguard.cgi +++ b/html/cgi-bin/wireguard.cgi @@ -582,9 +582,6 @@ END &Header::opensection(); if (%Wireguard::peers) { - # Fetch the dump - my %dump = &Wireguard::dump($Wireguard::INTF); - print < @@ -626,6 +623,9 @@ END my $gif = ($enabled eq "on") ? "on.gif" : "off.gif"; my @status = ("status"); + # Fetch the dump + my %dump = &Wireguard::dump("wg$key"); + # Fetch the status of the peer (if possible) my $status = $dump{$pubkey} || (); -- 2.39.5