On Wed, 2 Aug 2017 11:18:49 +0900
Satoshi Fujimoto wrote:
> The length of nd_option is units of 8 octets.
> Currently, for nd_options which is undefined in the ICMPv6 packet library,
> the parser assumes that the length is [8 * length - 2].
> It causes fails while
Thank you Fujimoto-san
/Shivaram
::Sent from my mobile device::
> On Aug 1, 2017, at 9:39 PM, Fujimoto Satoshi
> wrote:
>
> Hi, Shivaram
>
> Oops, I overlooked about it.
>
> It is needed for not only avoiding infinite loop, but also complying RFC.
> For the
Hi, Shivaram
Oops, I overlooked about it.
It is needed for not only avoiding infinite loop, but also complying RFC.
For the 'length' field in options, RFC4861 says that:
The value 0 is invalid. Nodes MUST
silently discard an ND packet that contains an
option with length zero.
So
Hello,
The patch from Bill was suggesting something like this:
if cls_ is not None:
option = cls_.parser(buf, offset)
else:
-option = buf[offset:offset + (length * 8 - 2)]
+assert length > 0 # avoid infinite loop when
The length of nd_option is units of 8 octets.
Currently, for nd_options which is undefined in the ICMPv6 packet library,
the parser assumes that the length is [8 * length - 2].
It causes fails while parsing these options.
This patch fixes it to parse such options correctly.
Signed-off-by: