Skip to content

Commit

Permalink
Merge pull request RIOT-OS#4738 from authmillenon/gnrc_ipv6/fix/accep…
Browse files Browse the repository at this point in the history
…t-dst-for-all-if

gnrc_ipv6: accept packets for global dst at all interfaces
  • Loading branch information
OlegHahm committed Mar 30, 2016
2 parents 1f4d73d + 5532f92 commit 230e105
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,9 +729,14 @@ static inline bool _pkt_not_for_me(kernel_pid_t *iface, ipv6_hdr_t *hdr)
if (ipv6_addr_is_loopback(&hdr->dst)) {
return false;
}
else if (*iface == KERNEL_PID_UNDEF) {
*iface = gnrc_ipv6_netif_find_by_addr(NULL, &hdr->dst);
return (*iface == KERNEL_PID_UNDEF);
else if ((!ipv6_addr_is_link_local(&hdr->dst)) ||
(*iface == KERNEL_PID_UNDEF)) {
kernel_pid_t if_pid = gnrc_ipv6_netif_find_by_addr(NULL, &hdr->dst);
if (*iface == KERNEL_PID_UNDEF) {
*iface = if_pid; /* Use original interface for reply if
* existent */
}
return (if_pid == KERNEL_PID_UNDEF);
}
else {
return (gnrc_ipv6_netif_find_addr(*iface, &hdr->dst) == NULL);
Expand Down

0 comments on commit 230e105

Please sign in to comment.