diff --git a/sys/net/network_layer/ng_ndp/node/ng_ndp_node.c b/sys/net/network_layer/ng_ndp/node/ng_ndp_node.c index 1123dbc7c80bc066740d7b7386028f53b1a669cf..1107d36adf855e61bff8def494438e2e6f252966 100644 --- a/sys/net/network_layer/ng_ndp/node/ng_ndp_node.c +++ b/sys/net/network_layer/ng_ndp/node/ng_ndp_node.c @@ -59,24 +59,27 @@ kernel_pid_t ng_ndp_node_next_hop_l2addr(uint8_t *l2addr, uint8_t *l2addr_len, kernel_pid_t iface, ipv6_addr_t *dst, ng_pktsnip_t *pkt) { + ng_ipv6_nc_t *nc_entry; ipv6_addr_t *next_hop_ip = NULL, *prefix = NULL; #ifdef MODULE_NG_IPV6_EXT_RH next_hop_ip = ng_ipv6_ext_rh_next_hop(hdr); #endif #ifdef MODULE_FIB - size_t next_hop_size = sizeof(ipv6_addr_t); - uint32_t next_hop_flags = 0; - ipv6_addr_t next_hop_actual; /* FIB copies address into this variable */ - - if ((next_hop_ip == NULL) && - (fib_get_next_hop(&iface, next_hop_actual.u8, &next_hop_size, - &next_hop_flags, (uint8_t *)dst, - sizeof(ipv6_addr_t), 0) >= 0) && - (next_hop_size == sizeof(ipv6_addr_t))) { - next_hop_ip = &next_hop_actual; + /* don't look-up link local addresses in FIB */ + if (!ipv6_addr_is_link_local(dst)) { + size_t next_hop_size = sizeof(ipv6_addr_t); + uint32_t next_hop_flags = 0; + ipv6_addr_t next_hop_actual; /* FIB copies address into this variable */ + + if ((next_hop_ip == NULL) && + (fib_get_next_hop(&iface, next_hop_actual.u8, &next_hop_size, + &next_hop_flags, (uint8_t *)dst, + sizeof(ipv6_addr_t), 0) >= 0) && + (next_hop_size == sizeof(ipv6_addr_t))) { + next_hop_ip = &next_hop_actual; + } } - #endif if ((next_hop_ip == NULL)) { /* no route to host */