]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
wireguard.cgi: Fix fetching connection status with multiple interfaces
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Nov 2024 12:34:35 +0000 (13:34 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 22 Apr 2025 14:48:53 +0000 (16:48 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/wireguard.cgi

index eb7511d6bd3b42d79f9e1fd5b6612e254168fb78..5f316847324cb676954c1004d8f088f7dd20b233 100644 (file)
@@ -582,9 +582,6 @@ END
        &Header::opensection();
 
        if (%Wireguard::peers) {
-               # Fetch the dump
-               my %dump = &Wireguard::dump($Wireguard::INTF);
-
                print <<END;
                        <table class='tbl'>
                                <tr>
@@ -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} || ();