From 57aa646d61932829062646a095a15ebdbe17f7b1 Mon Sep 17 00:00:00 2001 From: IWASE Yusuke Date: Mon, 5 Sep 2016 09:41:40 +0900 Subject: [PATCH] BGPSpeaker/vrf: Handle non MPLS labled NLRI 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 Signed-off-by: FUJITA Tomonori --- 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 5e22e299..2998dda1 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