mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
gnrc_rpl: use non-stack variable for link-local matching
This commit is contained in:
parent
4f3a40fb74
commit
f86bf8c9cd
@ -58,7 +58,6 @@ void gnrc_rpl_send(gnrc_pktsnip_t *pkt, kernel_pid_t iface, ipv6_addr_t *src, ip
|
|||||||
{
|
{
|
||||||
(void)dodag_id;
|
(void)dodag_id;
|
||||||
gnrc_pktsnip_t *hdr;
|
gnrc_pktsnip_t *hdr;
|
||||||
ipv6_addr_t ll_addr;
|
|
||||||
if (iface == KERNEL_PID_UNDEF) {
|
if (iface == KERNEL_PID_UNDEF) {
|
||||||
if ((iface = gnrc_ipv6_netif_find_by_addr(NULL, &ipv6_addr_all_rpl_nodes))
|
if ((iface = gnrc_ipv6_netif_find_by_addr(NULL, &ipv6_addr_all_rpl_nodes))
|
||||||
== KERNEL_PID_UNDEF) {
|
== KERNEL_PID_UNDEF) {
|
||||||
@ -69,8 +68,7 @@ void gnrc_rpl_send(gnrc_pktsnip_t *pkt, kernel_pid_t iface, ipv6_addr_t *src, ip
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (src == NULL) {
|
if (src == NULL) {
|
||||||
ipv6_addr_set_link_local_prefix(&ll_addr);
|
src = gnrc_ipv6_netif_match_prefix(iface, &ipv6_addr_link_local_prefix);
|
||||||
src = gnrc_ipv6_netif_match_prefix(iface, &ll_addr);
|
|
||||||
|
|
||||||
if (src == NULL) {
|
if (src == NULL) {
|
||||||
DEBUG("RPL: no suitable src address found\n");
|
DEBUG("RPL: no suitable src address found\n");
|
||||||
@ -478,7 +476,7 @@ bool _parse_options(int msg_type, gnrc_rpl_instance_t *inst, gnrc_rpl_opt_t *opt
|
|||||||
fib_dst_flags = ((uint32_t)(target->prefix_length) << FIB_FLAG_NET_PREFIX_SHIFT);
|
fib_dst_flags = ((uint32_t)(target->prefix_length) << FIB_FLAG_NET_PREFIX_SHIFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG("RPL: adding fib entry %s/%d 0x%x\n",
|
DEBUG("RPL: adding fib entry %s/%d 0x%" PRIx32 "\n",
|
||||||
ipv6_addr_to_str(addr_str, &(target->target), sizeof(addr_str)),
|
ipv6_addr_to_str(addr_str, &(target->target), sizeof(addr_str)),
|
||||||
target->prefix_length,
|
target->prefix_length,
|
||||||
fib_dst_flags);
|
fib_dst_flags);
|
||||||
|
Loading…
Reference in New Issue
Block a user