diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-04-07 17:52:20 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-04-07 17:52:20 +0200 |
commit | ca18311d0ae16a96e988df15a9009095f93df85e (patch) | |
tree | 2122c871968c5239049c18b785c2ff27c6593f4f /networking/nc_bloaty.c | |
parent | 8e23fafadee75bbe275bb795d0b2c2121dad93e7 (diff) | |
download | busybox-w32-ca18311d0ae16a96e988df15a9009095f93df85e.tar.gz busybox-w32-ca18311d0ae16a96e988df15a9009095f93df85e.tar.bz2 busybox-w32-ca18311d0ae16a96e988df15a9009095f93df85e.zip |
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c index e98a5dd5b..29f99e76b 100644 --- a/networking/nc_bloaty.c +++ b/networking/nc_bloaty.c | |||
@@ -386,10 +386,10 @@ create new one, and bind() it. TODO */ | |||
386 | if (port == 0) { | 386 | if (port == 0) { |
387 | /* "nc -nl -p LPORT RHOST" (w/o RPORT!): | 387 | /* "nc -nl -p LPORT RHOST" (w/o RPORT!): |
388 | * we should accept any remote port */ | 388 | * we should accept any remote port */ |
389 | set_nport(&remend, 0); /* blot out remote port# */ | 389 | set_nport(&remend.u.sa, 0); /* blot out remote port# */ |
390 | } | 390 | } |
391 | r = memcmp(&remend.u.sa, &themaddr->u.sa, remend.len); | 391 | r = memcmp(&remend.u.sa, &themaddr->u.sa, remend.len); |
392 | set_nport(&remend, sv_port); /* restore */ | 392 | set_nport(&remend.u.sa, sv_port); /* restore */ |
393 | if (r != 0) { | 393 | if (r != 0) { |
394 | /* nc 1.10 bails out instead, and its error message | 394 | /* nc 1.10 bails out instead, and its error message |
395 | * is not suppressed by o_verbose */ | 395 | * is not suppressed by o_verbose */ |
@@ -486,7 +486,7 @@ static int udptest(void) | |||
486 | us to hang forever, and hit it */ | 486 | us to hang forever, and hit it */ |
487 | o_wait = 5; /* enough that we'll notice?? */ | 487 | o_wait = 5; /* enough that we'll notice?? */ |
488 | rr = xsocket(ouraddr->u.sa.sa_family, SOCK_STREAM, 0); | 488 | rr = xsocket(ouraddr->u.sa.sa_family, SOCK_STREAM, 0); |
489 | set_nport(themaddr, htons(SLEAZE_PORT)); | 489 | set_nport(&themaddr->u.sa, htons(SLEAZE_PORT)); |
490 | connect_w_timeout(rr); | 490 | connect_w_timeout(rr); |
491 | /* don't need to restore themaddr's port, it's not used anymore */ | 491 | /* don't need to restore themaddr's port, it's not used anymore */ |
492 | close(rr); | 492 | close(rr); |
@@ -813,7 +813,7 @@ int nc_main(int argc UNUSED_PARAM, char **argv) | |||
813 | (themaddr ? themaddr->u.sa.sa_family : AF_UNSPEC), | 813 | (themaddr ? themaddr->u.sa.sa_family : AF_UNSPEC), |
814 | x); | 814 | x); |
815 | if (o_lport) | 815 | if (o_lport) |
816 | set_nport(ouraddr, htons(o_lport)); | 816 | set_nport(&ouraddr->u.sa, htons(o_lport)); |
817 | } | 817 | } |
818 | xmove_fd(x, netfd); | 818 | xmove_fd(x, netfd); |
819 | setsockopt_reuseaddr(netfd); | 819 | setsockopt_reuseaddr(netfd); |