This bug was introduced along with this function in
bb839899 `Provide
string_item_to_iaddr', which simply forgot to set the port.
The practical implications are that the port number of a locally bound
socket would not be specified, if an address was supplied, but only in
builds without IPv6 support. (This might result in the kernel picking
a port nmber; if authbind is in use it would probably cause authbind
to refuse.)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
ia->sin.sin_family=AF_INET;
ia->sin.sin_addr.s_addr=string_item_to_ipaddr(item,desc);
ia->sin.sin_family=AF_INET;
ia->sin.sin_addr.s_addr=string_item_to_ipaddr(item,desc);
+ ia->sin.sin_port=htons(port);
#else /* CONFIG_IPV6 => we have adns_text2addr */
#else /* CONFIG_IPV6 => we have adns_text2addr */