]> git.proxmox.com Git - pve-network.git/commitdiff
vlan plug: code cleanup
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 6 Jun 2019 06:28:41 +0000 (08:28 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 6 Jun 2019 06:28:41 +0000 (08:28 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/Network/Network/VlanPlugin.pm

index 063ae4996ebc971621def57af511e6b343b25801..f27e2175a4f9c994ff1e6023fd78f159dc13ce65 100644 (file)
@@ -69,7 +69,8 @@ sub generate_network_config {
 
     die "missing vlan tag" if !$tag;
 
 
     die "missing vlan tag" if !$tag;
 
-    my $iface = $uplinks->{$uplink}->{name} ? $uplinks->{$uplink}->{name} : "uplink$uplink";
+    my $iface = $uplinks->{$uplink}->{name};
+    $iface = "uplink${uplink}" if !$iface;
     $iface .= ".$tag";
     my $config = "\n";
     $config .= "auto $iface\n";
     $iface .= ".$tag";
     my $config = "\n";
     $config .= "auto $iface\n";