Skip to content
Snippets Groups Projects
Commit e10bd367 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Service component - L3NM gNMI OpenConfig:

- Ignore default networks 0.0.0.0/*
parent 43ab6388
No related branches found
No related tags found
1 merge request!298Resolve "Merge Hackfest 5 in `develop` and related code fixes"
......@@ -201,7 +201,8 @@ class DeviceComposer:
endpoint.ipv4_prefix_len = ipv4_prefix_len
endpoint.sub_interface_index = int(subif_index)
endpoint_ip_network = netaddr.IPNetwork('{:s}/{:d}'.format(ipv4_network, ipv4_prefix_len))
self.connected.add(str(endpoint_ip_network.cidr))
if '0.0.0.0/' not in str(endpoint_ip_network.cidr):
self.connected.add(str(endpoint_ip_network.cidr))
match = RE_SR.match(config_rule_custom.resource_key)
if match is not None:
......
......@@ -138,6 +138,7 @@ class StaticRouteGenerator:
if endpoint.ipv4_address is None: continue
ip_network = _compose_ipv4_network(endpoint.ipv4_address, endpoint.ipv4_prefix_len)
if '0.0.0.0/' in str(ip_network.cidr): continue
device.connected.add(str(ip_network.cidr))
def _compute_static_routes(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment