mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 12:13:47 +00:00
fixed bug #39514 ip_route() may return an IPv6-only interface
This commit is contained in:
parent
e9908048ec
commit
f36d6b7ef5
@ -96,6 +96,9 @@ HISTORY
|
|||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2014-02-25: Simon Goldschmidt
|
||||||
|
ip4.c: fixed bug #39514 ip_route() may return an IPv6-only interface
|
||||||
|
|
||||||
2014-02-25: Simon Goldschmidt, patch by Fatih Asici
|
2014-02-25: Simon Goldschmidt, patch by Fatih Asici
|
||||||
* pbuf.c: fixed bug #39356 Wrong increment in pbuf_memfind()
|
* pbuf.c: fixed bug #39356 Wrong increment in pbuf_memfind()
|
||||||
|
|
||||||
|
@ -123,7 +123,12 @@ ip_route(ip_addr_t *dest)
|
|||||||
/* iterate through netifs */
|
/* iterate through netifs */
|
||||||
for (netif = netif_list; netif != NULL; netif = netif->next) {
|
for (netif = netif_list; netif != NULL; netif = netif->next) {
|
||||||
/* network mask matches? */
|
/* network mask matches? */
|
||||||
if (netif_is_up(netif)) {
|
if ((netif_is_up(netif))
|
||||||
|
#if LWIP_IPV6
|
||||||
|
/* prevent using IPv6-only interfaces */
|
||||||
|
&& (!ip_addr_isany(&(netif->ip_addr)))
|
||||||
|
#endif /* LWIP_IPV6 */
|
||||||
|
) {
|
||||||
if (ip_addr_netcmp(dest, &(netif->ip_addr), &(netif->netmask))) {
|
if (ip_addr_netcmp(dest, &(netif->ip_addr), &(netif->netmask))) {
|
||||||
/* return netif on which to forward IP packet */
|
/* return netif on which to forward IP packet */
|
||||||
return netif;
|
return netif;
|
||||||
|
Loading…
Reference in New Issue
Block a user