mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-04 05:39:53 +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 */
|
* 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))) {
|
if (!ip4_addr_cmp(ip_2_ip4(&(pcb->local_ip)), netif_ip4_addr(netif))) {
|
||||||
/* local_ip doesn't match, drop the packet */
|
/* local_ip doesn't match, drop the packet */
|
||||||
return ERR_VAL;
|
return ERR_RTE;
|
||||||
}
|
}
|
||||||
/* use UDP PCB local IP address as source address */
|
/* use UDP PCB local IP address as source address */
|
||||||
src_ip = &pcb->local_ip;
|
src_ip = &pcb->local_ip;
|
||||||
|
Loading…
Reference in New Issue
Block a user