summaryrefslogtreecommitdiff
path: root/networking/nc_bloaty.c
diff options
context:
space:
mode:
authorDenys Vlasenko2011-04-07 17:52:20 +0200
committerDenys Vlasenko2011-04-07 17:52:20 +0200
commitca18311d0ae16a96e988df15a9009095f93df85e (patch)
tree2122c871968c5239049c18b785c2ff27c6593f4f /networking/nc_bloaty.c
parent8e23fafadee75bbe275bb795d0b2c2121dad93e7 (diff)
downloadbusybox-ca18311d0ae16a96e988df15a9009095f93df85e.zip
busybox-ca18311d0ae16a96e988df15a9009095f93df85e.tar.gz
libbb: make set_nport accept pointer to sockaddr, not to len_and_sockaddr.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/nc_bloaty.c')
-rw-r--r--networking/nc_bloaty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c
index e98a5dd..29f99e7 100644
--- a/networking/nc_bloaty.c
+++ b/networking/nc_bloaty.c
@@ -386,10 +386,10 @@ create new one, and bind() it. TODO */
if (port == 0) {
/* "nc -nl -p LPORT RHOST" (w/o RPORT!):
* we should accept any remote port */
- set_nport(&remend, 0); /* blot out remote port# */
+ set_nport(&remend.u.sa, 0); /* blot out remote port# */
}
r = memcmp(&remend.u.sa, &themaddr->u.sa, remend.len);
- set_nport(&remend, sv_port); /* restore */
+ set_nport(&remend.u.sa, sv_port); /* restore */
if (r != 0) {
/* nc 1.10 bails out instead, and its error message
* is not suppressed by o_verbose */
@@ -486,7 +486,7 @@ static int udptest(void)
us to hang forever, and hit it */
o_wait = 5; /* enough that we'll notice?? */
rr = xsocket(ouraddr->u.sa.sa_family, SOCK_STREAM, 0);
- set_nport(themaddr, htons(SLEAZE_PORT));
+ set_nport(&themaddr->u.sa, htons(SLEAZE_PORT));
connect_w_timeout(rr);
/* don't need to restore themaddr's port, it's not used anymore */
close(rr);
@@ -813,7 +813,7 @@ int nc_main(int argc UNUSED_PARAM, char **argv)
(themaddr ? themaddr->u.sa.sa_family : AF_UNSPEC),
x);
if (o_lport)
- set_nport(ouraddr, htons(o_lport));
+ set_nport(&ouraddr->u.sa, htons(o_lport));
}
xmove_fd(x, netfd);
setsockopt_reuseaddr(netfd);