1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

Merge pull request #20285 from benpicco/gnrc_loopback-linklocal

gnrc/ipv6: only send link-local loopback if it's on the same interface
This commit is contained in:
benpicco 2024-01-23 21:48:54 +00:00 committed by GitHub
commit ded97c36f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -714,6 +714,11 @@ static void _send(gnrc_pktsnip_t *pkt, bool prep_hdr)
else {
gnrc_netif_t *tmp_netif = gnrc_netif_get_by_ipv6_addr(&ipv6_hdr->dst);
/* only consider link-local addresses on the interface we are sending on */
if (tmp_netif != netif && ipv6_addr_is_link_local(&ipv6_hdr->dst)) {
tmp_netif = NULL;
}
if (ipv6_addr_is_loopback(&ipv6_hdr->dst) || /* dst is loopback address */
/* or dst registered to a local interface */
(tmp_netif != NULL)) {