The previous condition didn't fail tests because it was
always false. The 'exists' property is not actually usable
when writing the interface file. It is merely a hint that
the interface existed in /proc/net/dev while parsing the
interfaces file and is otherwise actually unused here.
Simply check for the existence of the interface in $ifaces.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
my $n = $ifaces->{$p};
die "vlan '$iface' - unable to find parent '$p'\n"
- if $n->{exists} eq 0;
+ if !$n;
if ($n->{type} eq 'bridge' && !$n->{bridge_vlan_aware}) {
die "vlan '$iface' - bridge vlan aware is not enabled on parent '$p'\n";