projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a34d0c
)
small fixes to ipv6 infrastructure
author
Denis Vlasenko
<vda.linux@googlemail.com>
Sat, 13 Jan 2007 21:05:38 +0000
(21:05 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Sat, 13 Jan 2007 21:05:38 +0000
(21:05 -0000)
libbb/xconnect.c
patch
|
blob
|
history
diff --git
a/libbb/xconnect.c
b/libbb/xconnect.c
index 65554b24e177140e085f852c50d80123fb29229f..377e0657eb29fd6895225cb68a2716aaba380d2b 100644
(file)
--- a/
libbb/xconnect.c
+++ b/
libbb/xconnect.c
@@
-48,6
+48,7
@@
unsigned bb_lookup_port(const char *port, const char *protocol, unsigned default
port_nr = bb_strtou(port, NULL, 10);
if (errno || port_nr > 65535) {
struct servent *tserv = getservbyname(port, protocol);
+ port_nr = default_port;
if (tserv)
port_nr = ntohs(tserv->s_port);
}
@@
-213,6
+214,7
@@
int create_and_bind_stream_or_die(const char *bindaddr, int port)
fd = xsocket(lsa->sa.sa_family, SOCK_STREAM, 0);
} else {
fd = xsocket_stream(&lsa);
+ set_nport(lsa, htons(port));
}
setsockopt_reuseaddr(fd);
xbind(fd, &lsa->sa, lsa->len);