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 <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
IWASE Yusuke 2016-09-05 09:41:40 +09:00 committed by FUJITA Tomonori
parent 3f104981d2
commit 57aa646d61

View File

@ -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