udp: don't use ip4_2_ip() where not required

This commit is contained in:
goldsimon 2015-09-24 10:39:13 +02:00
parent 51ce505d7d
commit 4d2f4ce78c

View File

@ -689,7 +689,7 @@ udp_sendto_if_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_i
#if LWIP_IPV4
if (ip4_addr_isany(ip_2_ip4(&pcb->local_ip))) {
/* use outgoing network interface IP address as source address */
src_ip = ip4_2_ip(netif_ip4_addr(netif), &src_ip_tmp);
src_ip = &netif->ip_addr;
} else {
/* check if UDP PCB local IP address is correct
* this could be an old address if netif->ip_addr has changed */