From 1bf62f95243dc0a359878863a48cc0bf39041814 Mon Sep 17 00:00:00 2001 From: "Eric A. Miller" Date: Sat, 8 Nov 2014 08:33:15 -0500 Subject: [PATCH] Use defined as test to catch vlan zero --- Info/Bridge.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Info/Bridge.pm b/Info/Bridge.pm index a720b6d8..ba654e0d 100644 --- a/Info/Bridge.pm +++ b/Info/Bridge.pm @@ -173,7 +173,8 @@ sub qb_fw_vlan { # Many devices do not populate the dot1qVlanCurrentTable, so default # to FDB ID = VID, but if we have a mapping use it. 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}; } $qb_fw_vlan->{$idx} = $vlan;