mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-22 13:03:54 +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:
commit
ded97c36f0
@ -714,6 +714,11 @@ static void _send(gnrc_pktsnip_t *pkt, bool prep_hdr)
|
|||||||
else {
|
else {
|
||||||
gnrc_netif_t *tmp_netif = gnrc_netif_get_by_ipv6_addr(&ipv6_hdr->dst);
|
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 */
|
if (ipv6_addr_is_loopback(&ipv6_hdr->dst) || /* dst is loopback address */
|
||||||
/* or dst registered to a local interface */
|
/* or dst registered to a local interface */
|
||||||
(tmp_netif != NULL)) {
|
(tmp_netif != NULL)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user