lwip: fix ip4_route function
dhcp function need to send udp messages but ip4_route() assumed that
the ip address of netif shouldn't be IPADDR_ANY from the first time.
IPADDR_ANY is the default value of netif and it's changed after dhcp.
@@ -220,7 +220,8 @@ struct netif *ip4_route(const ip4_addr_t *dest)
}
#endif
- if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default) || ip4_addr_isany_val(*netif_ip4_addr(netif_default))) {
+ if ((netif_default == NULL) || !netif_is_up(netif_default) || !netif_is_link_up(netif_default)) {
+ // || ip4_addr_isany_val(*netif_ip4_addr(netif_default))) { /* unused original lwIP code for tizenRT */
/* No matching netif found and default netif is not usable.
If this is not good enough for you, use LWIP_HOOK_IP4_ROUTE() */
LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip4_route: No route to %" U16_F ".%" U16_F ".%" U16_F ".%" U16_F "\n", ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest)));
