Merge branch 'bugfix/tw23835_add_source_ip_route_for_unicast_v3.1' into 'release/v3.1'
lwip: add source ip based route for unicast packet (backport v3.1) See merge request idf/esp-idf!2773
This commit is contained in:
commit
3716e3e8c4
1 changed files with 1 additions and 1 deletions
|
@ -142,7 +142,7 @@ ip4_route_src_hook(const ip4_addr_t *dest, const ip4_addr_t *src)
|
|||
struct netif *netif = NULL;
|
||||
|
||||
/* destination IP is broadcast IP? */
|
||||
if ((src != NULL) && (dest->addr == IPADDR_BROADCAST)) {
|
||||
if ((src != NULL) && (!ip4_addr_isany(src) || (dest->addr == IPADDR_BROADCAST))) {
|
||||
/* 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? */
|
||||
|
|
Loading…
Reference in a new issue