1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

gnrc_ipv6: use gnrc_ipv6_nc_get_l2_addr()

This commit is contained in:
Martine Lenders 2015-11-17 18:05:44 +01:00
parent 7b21f95df5
commit 0e0eef1273

View File

@ -544,12 +544,7 @@ static inline kernel_pid_t _next_hop_l2addr(uint8_t *l2addr, uint8_t *l2addr_len
#elif !defined(MODULE_GNRC_SIXLOWPAN_ND) && defined(MODULE_GNRC_IPV6_NC)
(void)pkt;
gnrc_ipv6_nc_t *nc = gnrc_ipv6_nc_get(iface, dst);
if ((nc == NULL) || !gnrc_ipv6_nc_is_reachable(nc)) {
return KERNEL_PID_UNDEF;
}
found_iface = nc->iface;
*l2addr_len = nc->l2_addr_len;
memcpy(l2addr, nc->l2_addr, nc->l2_addr_len);
found_iface = gnrc_ipv6_nc_get_l2_addr(l2addr, l2addr_len, nc);
#elif !defined(MODULE_GNRC_SIXLOWPAN_ND)
found_iface = KERNEL_PID_UNDEF;
(void)l2addr;