Skip to content
Snippets Groups Projects
Unverified Commit 3d9aad20 authored by Martine Lenders's avatar Martine Lenders Committed by GitHub
Browse files

Merge pull request #9854 from bergzand/pr/rpl/pass_opt_len

gnrc_rpl: Pass options length to msg validator
parents e54428ce af3232fb
No related branches found
No related tags found
No related merge requests found
...@@ -602,8 +602,9 @@ void gnrc_rpl_recv_DIS(gnrc_rpl_dis_t *dis, kernel_pid_t iface, ipv6_addr_t *src ...@@ -602,8 +602,9 @@ void gnrc_rpl_recv_DIS(gnrc_rpl_dis_t *dis, kernel_pid_t iface, ipv6_addr_t *src
if (gnrc_rpl_instances[i].state != 0) { if (gnrc_rpl_instances[i].state != 0) {
uint32_t included_opts = 0; uint32_t included_opts = 0;
size_t opt_len = len - sizeof(gnrc_rpl_dis_t) - sizeof(icmpv6_hdr_t);
if(!_parse_options(GNRC_RPL_ICMPV6_CODE_DIS, &gnrc_rpl_instances[i], if(!_parse_options(GNRC_RPL_ICMPV6_CODE_DIS, &gnrc_rpl_instances[i],
(gnrc_rpl_opt_t *)(dis + 1), len, src, &included_opts)) { (gnrc_rpl_opt_t *)(dis + 1), opt_len, src, &included_opts)) {
DEBUG("RPL: DIS option parsing error - skip processing the DIS\n"); DEBUG("RPL: DIS option parsing error - skip processing the DIS\n");
continue; continue;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment