diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-08-13 13:56:21 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-08-13 13:56:21 +0900 |
commit | c451b6e4ecb9507c0ed641e99eb7ff415caabd5f (patch) | |
tree | b968fa448e55b888b353a697367ba30d093e0557 | |
parent | c4abf05e9e03856db9452a9476b653fd31883e04 (diff) |
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 <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/lib/packet/bgp.py | 4 |
1 files 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): |