mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-05 06:39:52 +00:00
Fix inconsistent return value in udp_sendto_if() - ERR_RTE should always be returned when there is no available route
This commit is contained in:
parent
fdcd8f6faf
commit
f965034366
@ -662,7 +662,7 @@ udp_sendto_if_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_i
|
||||
* this could be an old address if netif->ip_addr has changed */
|
||||
if (!ip4_addr_cmp(ip_2_ip4(&(pcb->local_ip)), netif_ip4_addr(netif))) {
|
||||
/* local_ip doesn't match, drop the packet */
|
||||
return ERR_VAL;
|
||||
return ERR_RTE;
|
||||
}
|
||||
/* use UDP PCB local IP address as source address */
|
||||
src_ip = &pcb->local_ip;
|
||||
|
Loading…
x
Reference in New Issue
Block a user