The decoded mpls_labe should be return as a tuple of (mpls_labe,
is_bos).
This patch fixes to unpack the returned tuple.

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

diff --git a/ryu/lib/packet/bgp.py b/ryu/lib/packet/bgp.py
index c2db40e..f96e86a 100644
--- a/ryu/lib/packet/bgp.py
+++ b/ryu/lib/packet/bgp.py
@@ -3351,7 +3351,7 @@ class BGPPathAttributePmsiTunnel(_PathAttribute):
             # If binary type label field value is specified, stores it
             # and decodes as MPLS label and VNI.
             self._label = label
-            self._mpls_label = mpls.label_from_bin(label)
+            self._mpls_label, _ = mpls.label_from_bin(label)
             self._vni = vxlan.vni_from_bin(label)
         else:
             # If either MPLS label or VNI is specified, stores it
-- 
2.7.4


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

Reply via email to