mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
gnrc_ndp: unset isRouter flag for neighbor sending RS
This commit is contained in:
parent
0f31419f98
commit
802136dd9a
@ -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 */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user