diff --git a/sys/net/gnrc/network_layer/icmpv6/gnrc_icmpv6.c b/sys/net/gnrc/network_layer/icmpv6/gnrc_icmpv6.c index b09cd9616aadce5d3cecd272276dc35267c42757..c953baf3ee7f11ed32c135dcdaf406691b1d665e 100644 --- a/sys/net/gnrc/network_layer/icmpv6/gnrc_icmpv6.c +++ b/sys/net/gnrc/network_layer/icmpv6/gnrc_icmpv6.c @@ -92,9 +92,11 @@ void gnrc_icmpv6_demux(kernel_pid_t iface, gnrc_pktsnip_t *pkt) /* TODO */ break; +#ifdef MODULE_GNRC_NDP case ICMPV6_RTR_ADV: DEBUG("icmpv6: router advertisement received\n"); - /* TODO */ + gnrc_ndp_rtr_adv_handle(iface, pkt, ipv6->data, (ndp_rtr_adv_t *)hdr, + icmpv6->size); break; case ICMPV6_NBR_SOL: @@ -108,6 +110,7 @@ void gnrc_icmpv6_demux(kernel_pid_t iface, gnrc_pktsnip_t *pkt) gnrc_ndp_nbr_adv_handle(iface, pkt, ipv6->data, (ndp_nbr_adv_t *)hdr, icmpv6->size); break; +#endif case ICMPV6_REDIRECT: DEBUG("icmpv6: redirect message received\n"); diff --git a/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c b/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c index daa2c6666398ec71683c8ce1acca762fb5daa691..02f3368e094e2a014f87a8d07f0f71c222c4e2b3 100644 --- a/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c +++ b/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c @@ -190,6 +190,7 @@ static void *_event_loop(void *args) msg_reply(&msg, &reply); break; +#ifdef MODULE_GNRC_NDP case GNRC_NDP_MSG_RTR_TIMEOUT: DEBUG("ipv6: Router timeout received\n"); ((gnrc_ipv6_nc_t *)msg.content.ptr)->flags &= ~GNRC_IPV6_NC_IS_ROUTER; @@ -201,7 +202,6 @@ static void *_event_loop(void *args) (ipv6_addr_t *)msg.content.ptr); break; -#ifdef MODULE_GNRC_NDP case GNRC_NDP_MSG_NBR_SOL_RETRANS: DEBUG("ipv6: Neigbor solicitation retransmission timer event received\n"); gnrc_ndp_retrans_nbr_sol((gnrc_ipv6_nc_t *)msg.content.ptr); @@ -212,6 +212,12 @@ static void *_event_loop(void *args) gnrc_ndp_state_timeout((gnrc_ipv6_nc_t *)msg.content.ptr); break; #endif +#ifdef MODULE_GNRC_NDP_HOST + case GNRC_NDP_MSG_RTR_SOL_RETRANS: + DEBUG("ipv6: Router solicitation retransmission event received\n"); + gnrc_ndp_host_retrans_rtr_sol((gnrc_ipv6_netif_t *)msg.content.ptr); + break; +#endif default: break; diff --git a/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c b/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c index 1f21ea1b447c63e0378446e33548c6d87e53eaa9..8c8a91084dba99d60a31fa7eb2cb03132090c4b2 100644 --- a/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c +++ b/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c @@ -763,6 +763,10 @@ void gnrc_ipv6_netif_init_by_dev(void) } mutex_unlock(&ipv6_if->mutex); +#ifdef MODULE_GNRC_NDP_HOST + /* start periodic router solicitations */ + gnrc_ndp_host_init(ipv6_if); +#endif } }