aboutsummaryrefslogtreecommitdiffstats
path: root/vicn/resource/ip
diff options
context:
space:
mode:
authorMarcel Enguehard <mengueha+fdio@cisco.com>2017-10-09 08:44:59 +0200
committerMarcel Enguehard <mengueha+fdio@cisco.com>2017-10-09 08:55:46 +0200
commit5f8867a3454164ad20ae427dc9d2c7d65ea00a90 (patch)
treec8ff40fb147a76af2baa77790ba8a6ac968e51b4 /vicn/resource/ip
parentaf2dd545d04cfca7e7ec066035abf78c3d541915 (diff)
Several fixes related to async_set, ip addressing, and memif interfaces for VPP
Change-Id: I26b7928751f41ea66ba47bb1becac33cf5195915 Signed-off-by: Marcel Enguehard <mengueha+fdio@cisco.com>
Diffstat (limited to 'vicn/resource/ip')
-rw-r--r--vicn/resource/ip/central.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/vicn/resource/ip/central.py b/vicn/resource/ip/central.py
index 0c397728..75b590e1 100644
--- a/vicn/resource/ip/central.py
+++ b/vicn/resource/ip/central.py
@@ -82,7 +82,8 @@ class IPRoutes(Resource):
node_uuid = interface.node._state.uuid
if not node_uuid in origins:
origins[node_uuid] = list()
- origins[node_uuid].append(interface.ip4_address.canonical_prefix())
+ if interface.ip4_address:
+ origins[node_uuid].append(interface.ip4_address.canonical_prefix())
if interface.ip6_address:
origins[node_uuid].append(interface.ip6_address.canonical_prefix())
return origins
@@ -113,7 +114,6 @@ class IPRoutes(Resource):
# Avoid duplicate routes due to multiple paths in the network
if not src_node in ip_routes:
ip_routes[src_node] = set()
- #XXX Untested for VPP
#When you set up an IP address ip/prefix_len (ip addr add), you already create a route
#towards ip/prefix_len
for interface in src_node.interfaces: