this should fix a problem reported by Gabriele Gerbino on ryu-devel.
Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
ryu/lib/packet/icmpv6.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ryu/lib/packet/icmpv6.py b/ryu/lib/packet/icmpv6.py
index 6b99e40..256f53d 100644
--- a/ryu/lib/packet/icmpv6.py
+++ b/ryu/lib/packet/icmpv6.py
@@ -373,13 +373,14 @@ class nd_router_advert(stringify.StringifyMixin):
msg.length.append(length)
cls_ = cls._ND_OPTION_TYPES.get(type_, None)
offset += 2
+ byte_len = length * 8 - 2
if cls_:
msg.data.append(cls_.parser(buf[:offset+cls_._MIN_LEN],
offset))
offset += cls_._MIN_LEN
else:
- msg.data.append(buf[offset:])
- offset = len(buf)
+ msg.data.append(buf[offset:offset + byte_len])
+ offset += byte_len
return msg
--
1.8.3.1
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel