Skip to content

Commit

Permalink
[show] Fix show arp in case with FDB entries, linked to default VLAN (s…
Browse files Browse the repository at this point in the history
…onic-net#1517)

Same as sonic-net#1357
But target for 201911 branch
  • Loading branch information
qiluo-msft authored Mar 19, 2021
1 parent ad8eb74 commit b5aedfb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/nbrshow
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ class NbrBase(object):
elif 'bvid' in fdb:
try:
vlan_id = port_util.get_vlan_id_from_bvid(self.db, fdb["bvid"])
if vlan_id is None:
# the case could be happened if the FDB entry has created with linking to
# default VLAN 1, which is not present in the system
continue
except:
vlan_id = fdb["bvid"]
print "Failed to get Vlan id for bvid {}\n".format(fdb["bvid"])
Expand Down

0 comments on commit b5aedfb

Please sign in to comment.