The `string_item_to_ipaddr' function returns addresses as a single
integer in host byte order. But this isn't what's wanted for setting up
`struct sockaddr_in', for example. The function `adns_text2addr' does
the right thing.
I think this has always been wrong for setting up UDP sockets: before
the introduction of `string_item_to_iaddr', `udp_apply' would call
`string_item_to_ipaddr' directly, and neglected to swap the bytes.
Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
#ifndef CONFIG_IPV6
ia->sin.sin_family=AF_INET;
- ia->sin.sin_addr.s_addr=string_item_to_ipaddr(item,desc);
+ ia->sin.sin_addr.s_addr=htonl(string_item_to_ipaddr(item,desc));
ia->sin.sin_port=htons(port);
#else /* CONFIG_IPV6 => we have adns_text2addr */