chiark / gitweb /
string_item_to_iaddr: Actually set port if !CONFIG_IPV6
[secnet.git] / util.c
diff --git a/util.c b/util.c
index 1d05822f5dfb53dcb80acefbd3d1575deb2d1138..d1621fcb5acfe3534556cf17843c1c42ec4d05e6 100644 (file)
--- a/util.c
+++ b/util.c
@@ -526,6 +526,7 @@ void string_item_to_iaddr(const item_t *item, uint16_t port, union iaddr *ia,
 
     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 */