On Thu, 31 Jul 2014 10:21:22 +0900
Hiroshi Yokoi <[email protected]> wrote:

> I will check the test case and my patch.

The following patch for your second patch works for me.

diff --git a/ryu/lib/packet/bgp.py b/ryu/lib/packet/bgp.py
index cf7076a..b91ece7 100644
--- a/ryu/lib/packet/bgp.py
+++ b/ryu/lib/packet/bgp.py
@@ -1813,8 +1813,10 @@ class BGPPathAttributeMpReachNLRI(_PathAttribute):
             next_hop = addrconv.ipv6.bin_to_text(next_hop_bin)
         elif rf == RF_IPv6_VPN:
             next_hop = addrconv.ipv6.bin_to_text(next_hop_bin[cls._rd_length:])
+            next_hop_len -= cls._rd_length
         elif rf == RF_IPv4_VPN:
             next_hop = addrconv.ipv4.bin_to_text(next_hop_bin[cls._rd_length:])
+            next_hop_len -= cls._rd_length
         else:
             next_hop = addrconv.ipv4.bin_to_text(next_hop_bin)
         return {

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to