mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/wireguard: $node->interface doesn't exist yet
This commit is contained in:
@@ -92,10 +92,11 @@ function wireguard_devices()
|
||||
$names = [];
|
||||
foreach ((new OPNsense\Wireguard\Server())->servers->server->iterateItems() as $key => $node) {
|
||||
if (!empty((string)$node->enabled)) {
|
||||
$names[(string)$node->interface] = [
|
||||
'descr' => sprintf('%s (WireGuard - %s)', (string)$node->interface, (string)$node->name),
|
||||
$device = 'wg' . $node->instance;
|
||||
$names[$device] = [
|
||||
'descr' => sprintf('%s (WireGuard - %s)', $device, (string)$node->name),
|
||||
'ifdescr' => (string)$node->name,
|
||||
'name' => (string)$node->interface
|
||||
'name' => $device,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user