提交 be2006f3 编写于 作者: yuke1412's avatar yuke1412 提交者: liuxianliang

fix sys_arch.c

上级 cda78884
......@@ -786,21 +786,21 @@ struct netif *lwip_ip4_route_src(const ip4_addr_t *dest, const ip4_addr_t *src)
/* iterate through netifs */
for (netif = netif_list; netif != NULL; netif = netif->next)
{
/* is the netif up, does it have a link and a valid address? */
if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif)))
{
/* gateway matches on a non broadcast interface? (i.e. peer in a point to point interface) */
if (src != NULL)
{
if (ip4_addr_cmp(src, netif_ip4_addr(netif)))
/* is the netif up, does it have a link and a valid address? */
if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif)))
{
return netif;
/* gateway matches on a non broadcast interface? (i.e. peer in a point to point interface) */
if (src != NULL)
{
if (ip4_addr_cmp(src, netif_ip4_addr(netif)))
{
return netif;
}
}
}
}
}
}
netif = netif_default;
return netif;
netif = netif_default;
return netif;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册