Skip to content

Commit

Permalink
gnrc_ipv6: iface might be from input on next hop determination
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Sep 22, 2015
1 parent d1bd2ae commit aefb74f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,26 +530,29 @@ static inline kernel_pid_t _next_hop_l2addr(uint8_t *l2addr, uint8_t *l2addr_len
kernel_pid_t iface, ipv6_addr_t *dst,
gnrc_pktsnip_t *pkt)
{
kernel_pid_t found_iface;
#if defined(MODULE_GNRC_SIXLOWPAN_ND)
(void)pkt;
iface = gnrc_sixlowpan_nd_next_hop_l2addr(l2addr, l2addr_len, iface, dst);
if (iface <= KERNEL_PID_UNDEF) {
return iface;
found_iface = gnrc_sixlowpan_nd_next_hop_l2addr(l2addr, l2addr_len, iface, dst);
if (found_iface <= KERNEL_PID_UNDEF) {
return found_iface;
}
#else
found_iface = KERNEL_PID_UNDEF;
#endif
#if defined(MODULE_GNRC_NDP_NODE)
if (iface <= KERNEL_PID_UNDEF) {
iface = gnrc_ndp_node_next_hop_l2addr(l2addr, l2addr_len, iface, dst, pkt);
if (found_iface <= KERNEL_PID_UNDEF) {
found_iface = gnrc_ndp_node_next_hop_l2addr(l2addr, l2addr_len, iface, dst, pkt);
}
#elif !defined(MODULE_GNRC_SIXLOWPAN_ND)
iface = KERNEL_PID_UNDEF;
(void)l2addr;
(void)l2addr_len;
(void)iface;
(void)dst;
(void)pkt;
*l2addr_len = 0;
#endif
return iface;
return found_iface;
}

static void _send(gnrc_pktsnip_t *pkt, bool prep_hdr)
Expand Down

0 comments on commit aefb74f

Please sign in to comment.