-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes several bugs on GNRC network stack #4447
Changes from all commits
5cb904b
542e045
c9c83c7
cf35763
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,10 +154,11 @@ kernel_pid_t gnrc_sixlowpan_nd_next_hop_l2addr(uint8_t *l2addr, uint8_t *l2addr_ | |
if (nc_entry != NULL) { | ||
gnrc_ipv6_netif_t *ipv6_if = gnrc_ipv6_netif_get(nc_entry->iface); | ||
/* and interface is not 6LoWPAN */ | ||
if (!(ipv6_if->flags & GNRC_IPV6_NETIF_FLAGS_SIXLOWPAN) || | ||
if (!((ipv6_if == NULL) || | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would prefer an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The function may be called with the There would be a better comprehensive solution for coordinating NDPs for conventional IPv6 and 6LoWPAN, but it would require a large restructuring, so that ad hoc workaround here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay |
||
(ipv6_if->flags & GNRC_IPV6_NETIF_FLAGS_SIXLOWPAN)) || | ||
/* or entry is registered */ | ||
(gnrc_ipv6_nc_get_type(nc_entry) == GNRC_IPV6_NC_TYPE_REGISTERED)) { | ||
next_hop = dst; | ||
(gnrc_ipv6_nc_get_type(nc_entry) == GNRC_IPV6_NC_TYPE_REGISTERED)) { | ||
next_hop = dst; | ||
} | ||
} | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if this timer was set by a router solicitation of another neighbor. I think the better solution would be to check if the neighbor cache entry is still set in the handler function of this timer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If another neighbor set the timer,
if_entry->rtr_adv_msg.content.ptr
will be updated, so that the timer is not cancelled here.