Use defined as test to catch vlan zero
This commit is contained in:
@@ -173,7 +173,8 @@ sub qb_fw_vlan {
|
|||||||
# Many devices do not populate the dot1qVlanCurrentTable, so default
|
# Many devices do not populate the dot1qVlanCurrentTable, so default
|
||||||
# to FDB ID = VID, but if we have a mapping use it.
|
# to FDB ID = VID, but if we have a mapping use it.
|
||||||
my $vlan = $fdb_id;
|
my $vlan = $fdb_id;
|
||||||
if ($qb_fdb_ids->{$fdb_id}) {
|
# defined as test since some devices have a vlan 0
|
||||||
|
if (defined $qb_fdb_ids->{$fdb_id}) {
|
||||||
$vlan = $qb_fdb_ids->{$fdb_id};
|
$vlan = $qb_fdb_ids->{$fdb_id};
|
||||||
}
|
}
|
||||||
$qb_fw_vlan->{$idx} = $vlan;
|
$qb_fw_vlan->{$idx} = $vlan;
|
||||||
|
|||||||
Reference in New Issue
Block a user