aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-13 21:05:38 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-13 21:05:38 +0000
commit17404d32f8a380def4fe8db90300572582d35b5d (patch)
tree5d7ec0b0b1ff0fbcd64d0734a4d93f13f99ef1f1
parentd3bcc434bbc51143284e0108521b97f961c144d2 (diff)
downloadbusybox-w32-17404d32f8a380def4fe8db90300572582d35b5d.tar.gz
busybox-w32-17404d32f8a380def4fe8db90300572582d35b5d.tar.bz2
busybox-w32-17404d32f8a380def4fe8db90300572582d35b5d.zip
small fixes to ipv6 infrastructure
git-svn-id: svn://busybox.net/trunk/busybox@17264 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--libbb/xconnect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libbb/xconnect.c b/libbb/xconnect.c
index 65554b24e..377e0657e 100644
--- a/libbb/xconnect.c
+++ b/libbb/xconnect.c
@@ -48,6 +48,7 @@ unsigned bb_lookup_port(const char *port, const char *protocol, unsigned default
48 port_nr = bb_strtou(port, NULL, 10); 48 port_nr = bb_strtou(port, NULL, 10);
49 if (errno || port_nr > 65535) { 49 if (errno || port_nr > 65535) {
50 struct servent *tserv = getservbyname(port, protocol); 50 struct servent *tserv = getservbyname(port, protocol);
51 port_nr = default_port;
51 if (tserv) 52 if (tserv)
52 port_nr = ntohs(tserv->s_port); 53 port_nr = ntohs(tserv->s_port);
53 } 54 }
@@ -213,6 +214,7 @@ int create_and_bind_stream_or_die(const char *bindaddr, int port)
213 fd = xsocket(lsa->sa.sa_family, SOCK_STREAM, 0); 214 fd = xsocket(lsa->sa.sa_family, SOCK_STREAM, 0);
214 } else { 215 } else {
215 fd = xsocket_stream(&lsa); 216 fd = xsocket_stream(&lsa);
217 set_nport(lsa, htons(port));
216 } 218 }
217 setsockopt_reuseaddr(fd); 219 setsockopt_reuseaddr(fd);
218 xbind(fd, &lsa->sa, lsa->len); 220 xbind(fd, &lsa->sa, lsa->len);