Currently, VRF Table supposes the incoming NLRI has MPLS labels
field, but some EVPN NLRI don't have MPLS labels field, and
BGPSpeaker fails to import the incoming routes from the neighbours.

This patch fixes this problem.

Signed-off-by: IWASE Yusuke <[email protected]>
---
 ryu/services/protocols/bgp/info_base/vrf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ryu/services/protocols/bgp/info_base/vrf.py 
b/ryu/services/protocols/bgp/info_base/vrf.py
index 5e22e29..2998dda 100644
--- a/ryu/services/protocols/bgp/info_base/vrf.py
+++ b/ryu/services/protocols/bgp/info_base/vrf.py
@@ -175,7 +175,7 @@ class VrfTable(Table):
             pattrs=vpn_path.pathattr_map,
             nexthop=vpn_path.nexthop,
             is_withdraw=vpn_path.is_withdraw,
-            label_list=vpn_path.nlri.label_list
+            label_list=getattr(vpn_path.nlri, 'label_list', None),
         )
         if self._is_vrf_path_already_in_table(vrf_path):
             return None
-- 
2.7.4


------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to