Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[filter-fdb] Fix For Vlan Defined With No CIDR #976

Merged
merged 1 commit into from
Jul 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scripts/filter_fdb_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def get_vlan_cidr_map(filename):
vlan_cidr = defaultdict()
if "VLAN_INTERFACE" in config_db_entries.keys() and "VLAN" in config_db_entries.keys():
for vlan_key in config_db_entries["VLAN_INTERFACE"].keys():
if '|' not in vlan_key:
tahmed-dev marked this conversation as resolved.
Show resolved Hide resolved
continue
vlan, cidr = tuple(vlan_key.split('|'))
if vlan in config_db_entries["VLAN"]:
vlan_cidr[vlan] = ip_interface(cidr).network
Expand Down
1 change: 1 addition & 0 deletions sonic-utilities-tests/filter_fdb_input/test_vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
"Vlan1000": {}
},
"VLAN_INTERFACE": {
"Vlan1000": {},
"Vlan1000|192.168.128.1/21": {}
},
},
Expand Down