From c451b6e4ecb9507c0ed641e99eb7ff415caabd5f Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Wed, 13 Aug 2014 13:56:21 +0900 Subject: [PATCH] bgp: fix bug of labels formatting for show VPNv4 prefix information The field of 'Labels' has not displayed in properly because of extracting 'label_list' in python slicing tuples. INFO:bgpspeaker.api.base:API method operator.show called with args: {'params': ['rib', 'all'], 'format': 'cli'} Status codes: * valid, > best Network Labels Next Hop Reason Metric LocPrf Path/Origin Family: rtfilter *> 64512:64511:101 None 0.0.0.0 Only Path 2 Family: vpnv6 Family: vpnv4 *> 64511:101:10.10.0.1/32 ([17],) 192.168.100.100 Only Path 0 64511 2 *> 64511:101:10.20.2.0/24 ([100],) 0.0.0.0 Only Path 2 *> 64511:101:10.20.1.0/24 ([100],) 0.0.0.0 Only Path 2 *> 64511:101:10.20.3.0/24 ([100],) 0.0.0.0 Only Path 2 Family: ipv4 Family: ipv6 Reported-by: Toshiki Tsuboi Signed-off-by: FUJITA Tomonori --- ryu/lib/packet/bgp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ryu/lib/packet/bgp.py b/ryu/lib/packet/bgp.py index 3cace687..7c716b43 100644 --- a/ryu/lib/packet/bgp.py +++ b/ryu/lib/packet/bgp.py @@ -932,7 +932,7 @@ class LabelledVPNIPAddrPrefix(_LabelledAddrPrefix, _VPNAddrPrefix, @property def label_list(self): - return self.addr[:-2] + return self.addr[0] @property def formatted_nlri_str(self): @@ -955,7 +955,7 @@ class LabelledVPNIP6AddrPrefix(_LabelledAddrPrefix, _VPNAddrPrefix, @property def label_list(self): - return self.addr[:-2] + return self.addr[0] @property def formatted_nlri_str(self):