[riot-notifications] [RIOT] ndp: fix NDP PI option length validation and option processing in RTR_ADV msg (#3810)

Martine Lenders notifications at github.com
Thu Sep 10 13:52:24 CEST 2015


> @@ -247,6 +247,10 @@ void gnrc_ndp_nbr_adv_handle(kernel_pid_t iface, gnrc_pktsnip_t *pkt,
>  
>          opt_offset += (opt->len * 8);
>          sicmpv6_size -= (opt->len * 8);
> +
> +        if (sicmpv6_size < 0) {
> +            DEBUG("ndp: Option parsing out of sync.\n");
> +        }

If you really want to add this message, surround it with `#if ENABLE_DEBUG` please. Also why not the other message handle functions then, too?

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3810/files#r39150984
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150910/9e79e313/attachment.html>


More information about the notifications mailing list