gnrc_rpl: check index after fetching address from netif

This commit is contained in:
Martine S. Lenders 2020-09-07 08:39:29 +02:00
parent b2da5d0687
commit f7913b3d47
No known key found for this signature in database
GPG Key ID: CCD317364F63286F

View File

@ -997,6 +997,10 @@ void gnrc_rpl_send_DAO(gnrc_rpl_instance_t *inst, ipv6_addr_t *destination, uint
return;
}
idx = gnrc_netif_ipv6_addr_match(netif, &dodag->dodag_id);
if (idx < 0) {
DEBUG("RPL: no address matching DODAG ID found\n");
return;
}
me = &netif->ipv6.addrs[idx];
/* add external and RPL FT entries */