diff --git a/src/include/ipv4/lwip/ip_addr.h b/src/include/ipv4/lwip/ip_addr.h index 6fb82032..f48fa9e5 100644 --- a/src/include/ipv4/lwip/ip_addr.h +++ b/src/include/ipv4/lwip/ip_addr.h @@ -136,7 +136,7 @@ extern const ip_addr_t ip_addr_broadcast; /** Set complete address to zero */ #define ip_addr_set_zero(ipaddr) (ipaddr)->addr = IPADDR_ANY /** Set address to loopback address */ -#define ip_addr_set_loopback(ipaddr) ((ipaddr)->addr = IPADDR_LOOPBACK) +#define ip_addr_set_loopback(ipaddr) ((ipaddr)->addr = htonl(IPADDR_LOOPBACK)) /** Safely copy one IP address to another and change byte order * from host- to network-order. */ #define ip_addr_set_hton(dest, src) ((dest)->addr = \