From f965034366f774e5ae5e1b9a2b7e292f04605867 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Fri, 11 Nov 2016 11:12:54 +0100 Subject: [PATCH] Fix inconsistent return value in udp_sendto_if() - ERR_RTE should always be returned when there is no available route --- src/core/udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/udp.c b/src/core/udp.c index f9aee732..e0ab1863 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -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;