mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 13:56:09 +02:00
packet lib: icmpv6.nd_router_advert: skip unknown options correctly
this should fix a problem reported by Gabriele Gerbino on ryu-devel. Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
96f857c643
commit
97aff06df4
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user