5
0
mirror of git://git.proxmox.com/git/pve-network.git synced 2025-01-23 02:04:20 +03:00

vnets: fix get_vnet

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2021-09-24 10:50:58 +02:00 committed by Thomas Lamprecht
parent 9c24bcc5eb
commit afc906a4dc

View File

@ -54,15 +54,15 @@ sub get_vnet {
return if !$vnetid;
my $cfg = {};
my $scfg = {};
if($running) {
my $cfg = PVE::Network::SDN::running_config();
$cfg = $cfg->{vnets};
$scfg = $cfg->{vnets};
} else {
$cfg = PVE::Network::SDN::Vnets::config();
$scfg = PVE::Network::SDN::Vnets::config();
}
my $vnet = PVE::Network::SDN::Vnets::sdn_vnets_config($cfg, $vnetid, 1);
my $vnet = PVE::Network::SDN::Vnets::sdn_vnets_config($scfg, $vnetid, 1);
return $vnet;
}