ipv6 send multicast data fail when src address is nul

This commit is contained in:
xueyunfei
2020-09-17 10:49:28 +08:00
parent de3e942f4b
commit 4fd84abace
2 changed files with 8 additions and 7 deletions
+8
View File
@@ -174,7 +174,15 @@ ip6_route(const ip6_addr_t *src, const ip6_addr_t *dest)
}
/* Again, do not use any other netif in this case, as that could result in
* zone boundary violations. */
#if ESP_IPV6
if (ip6_addr_ismulticast(dest) && ip6_addr_isany(src)) {
return netif_default;
} else {
return NULL;
}
#else
return NULL;
#endif /* ESP_IPV6 */
}
/* We come here only if neither source nor destination is scoped. */
-7
View File
@@ -587,13 +587,6 @@ udp_sendto_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip,
netif = ip4_route_src(ip_2_ip4(&pcb->local_ip), &pcb->mcast_ip4);
}
}
#if LWIP_IPV6
#if ESP_LWIP
else if (IP_IS_V6(dst_ip)) {
dst_ip =&pcb->local_ip;
}
#endif /* ESP_LWIP */
#endif /* LWIP_IPV6 */
#endif /* LWIP_IPV4 */
}