From 83d209f5e129737189891ae6c0be48c0407baddb Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 6 Jun 2019 08:28:41 +0200 Subject: [PATCH] vlan plug: code cleanup Signed-off-by: Thomas Lamprecht --- PVE/Network/Network/VlanPlugin.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/Network/Network/VlanPlugin.pm b/PVE/Network/Network/VlanPlugin.pm index 063ae49..f27e217 100644 --- a/PVE/Network/Network/VlanPlugin.pm +++ b/PVE/Network/Network/VlanPlugin.pm @@ -69,7 +69,8 @@ sub generate_network_config { 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"; -- 2.39.2