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

[vnet_route_check] don't hardcode prefix length of /24 #1756

Merged
Merged
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
6 changes: 4 additions & 2 deletions scripts/vnet_route_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ def filter_out_vnet_ip2me_routes(vnet_routes):
# rif_attrs[1] - IP prefix and prefix legth
# IP2ME routes have '/32' prefix length so replace it and add to the list
if rif_attrs[0] in vnet_intfs:
vnet_ip2me_routes.append(rif_attrs[1].replace('/24', '/32'))
rif_ip, _ = rif_attrs[1].split('/')
ip2me_route = rif_ip + '/32'
vnet_ip2me_routes.append(ip2me_route)

for vnet, vnet_attrs in vnet_routes.items():
for route in vnet_attrs['routes']:
Expand Down Expand Up @@ -240,7 +242,7 @@ def get_vnet_routes_from_asic_db():

vnet_vrfs = get_vrf_entries()
vnet_vrfs_oids = [vnet_vrfs[k] for k in vnet_vrfs]

vnet_intfs = get_vnet_intfs()

vrf_oid_to_vnet_map = {}
Expand Down