Skip to content
Snippets Groups Projects
Commit 802136dd authored by Martine Lenders's avatar Martine Lenders
Browse files

gnrc_ndp: unset isRouter flag for neighbor sending RS

parent 0f31419f
No related branches found
No related tags found
No related merge requests found
......@@ -381,6 +381,7 @@ void gnrc_ndp_rtr_sol_handle(kernel_pid_t iface, gnrc_pktsnip_t *pkt,
gnrc_ipv6_netif_t *if_entry = gnrc_ipv6_netif_get(iface);
if (if_entry->flags & GNRC_IPV6_NETIF_FLAGS_ROUTER) {
gnrc_ipv6_nc_t *nc_entry;
int sicmpv6_size = (int)icmpv6_size, l2src_len = 0;
uint8_t l2src[GNRC_IPV6_NC_L2_ADDR_MAX];
uint16_t opt_offset = 0;
......@@ -458,12 +459,18 @@ void gnrc_ndp_rtr_sol_handle(kernel_pid_t iface, gnrc_pktsnip_t *pkt,
/* or unicast, if source is known */
/* XXX: can't just use GNRC_NETAPI_MSG_TYPE_SND, since the next retransmission
* must also be set. */
gnrc_ipv6_nc_t *nc_entry = gnrc_ipv6_nc_get(iface, &ipv6->src);
nc_entry = gnrc_ipv6_nc_get(iface, &ipv6->src);
xtimer_set_msg(&nc_entry->rtr_adv_timer, delay, &nc_entry->rtr_adv_msg,
gnrc_ipv6_pid);
}
#endif
}
nc_entry = gnrc_ipv6_nc_get(iface, &ipv6->src);
if (nc_entry != NULL) {
/* unset isRouter flag
* (https://tools.ietf.org/html/rfc4861#section-6.2.6) */
nc_entry->flags &= ~GNRC_IPV6_NC_IS_ROUTER;
}
}
/* otherwise ignore silently */
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment