]> git.proxmox.com Git - pve-container.git/commitdiff
check_bridge_access: code cleanup
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 9 Jun 2023 08:10:04 +0000 (10:10 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 9 Jun 2023 08:10:06 +0000 (10:10 +0200)
like in qemu-server

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/LXC.pm

index 9642f2e508eb0895a5f8f1ccf9565cfab246cba2..37f184d046c9832e6f1674b33ceff987da3e4ae4 100644 (file)
@@ -1390,9 +1390,7 @@ sub check_bridge_access {
     return 1 if $authuser eq 'root@pam';
 
     my $net = PVE::LXC::Config->parse_lxc_network($raw);
-    my $bridge = $net->{bridge};
-    my $tag = $net->{tag};
-    my $trunks = $net->{trunks};
+    my ($bridge, $tag, $trunks) = $net->@{'bridge', 'tag', 'trunks'};
     check_vnet_access($rpcenv, $authuser, $bridge, $tag, $trunks);
 
     return 1;