mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
ng_ndp: fix ng_ndp_get_next_hop() for FIB fix in #3250
This commit is contained in:
parent
04719b326c
commit
1b4a05e5a8
@ -415,13 +415,16 @@ kernel_pid_t ng_ndp_next_hop_l2addr(uint8_t *l2addr, uint8_t *l2addr_len,
|
|||||||
#ifdef MODULE_FIB
|
#ifdef MODULE_FIB
|
||||||
size_t next_hop_size;
|
size_t next_hop_size;
|
||||||
uint32_t next_hop_flags = 0;
|
uint32_t next_hop_flags = 0;
|
||||||
|
ng_ipv6_addr_t next_hop_actual; /* FIB copies address into this variable */
|
||||||
|
|
||||||
if ((next_hop_ip == NULL) &&
|
if ((next_hop_ip == NULL) &&
|
||||||
((fib_get_next_hop(&iface, (uint8_t *)next_hop_ip, &next_hop_size,
|
(fib_get_next_hop(&iface, next_hop_actual.u8, &next_hop_size,
|
||||||
&next_hop_flags, (uint8_t *)dst,
|
&next_hop_flags, (uint8_t *)dst,
|
||||||
sizeof(ng_ipv6_addr_t), 0) < 0) ||
|
sizeof(ng_ipv6_addr_t), 0) >= 0) &&
|
||||||
(next_hop_size != sizeof(ng_ipv6_addr_t)))) {
|
(next_hop_size == sizeof(ng_ipv6_addr_t))) {
|
||||||
next_hop_ip = NULL;
|
next_hop_ip = &next_hop_actual;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if ((next_hop_ip == NULL)) { /* no route to host */
|
if ((next_hop_ip == NULL)) { /* no route to host */
|
||||||
|
Loading…
Reference in New Issue
Block a user