From: Michael Tremer Date: Fri, 22 Nov 2024 12:34:35 +0000 (+0100) Subject: wireguard.cgi: Fix fetching connection status with multiple interfaces X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d241960201088fea9eeae80eee06555a724a03f;p=ipfire-2.x.git wireguard.cgi: Fix fetching connection status with multiple interfaces Signed-off-by: Michael Tremer --- 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} || ();