mirror of
https://github.com/nmap/nmap.git
synced 2025-12-11 10:19:03 +00:00
Remove the "Linux goofiness" zero-byte write test from scan_engine.cc.
See r14426 in /nsock.
This commit is contained in:
@@ -3689,17 +3689,6 @@ static bool do_one_select_round(UltraScanInfo *USI, struct timeval *stime) {
|
|||||||
case 0:
|
case 0:
|
||||||
#ifdef LINUX
|
#ifdef LINUX
|
||||||
if (!FD_ISSET(sd, &fds_rtmp)) {
|
if (!FD_ISSET(sd, &fds_rtmp)) {
|
||||||
/* Linux goofiness -- We need to actually test that it is writeable */
|
|
||||||
res = send(sd, "", 0, 0);
|
|
||||||
|
|
||||||
if (res < 0 ) {
|
|
||||||
if (o.debugging > 1) {
|
|
||||||
log_write(LOG_STDOUT, "Bad port %hu caught by 0-byte write: ",
|
|
||||||
pport);
|
|
||||||
perror("");
|
|
||||||
}
|
|
||||||
newportstate = PORT_CLOSED;
|
|
||||||
} else {
|
|
||||||
if (getpeername(sd, (struct sockaddr *) &sin, &sinlen) < 0) {
|
if (getpeername(sd, (struct sockaddr *) &sin, &sinlen) < 0) {
|
||||||
pfatal("error in getpeername of connect_results for port %hu", (u16) pport);
|
pfatal("error in getpeername of connect_results for port %hu", (u16) pport);
|
||||||
} else {
|
} else {
|
||||||
@@ -3733,7 +3722,6 @@ static bool do_one_select_round(UltraScanInfo *USI, struct timeval *stime) {
|
|||||||
newhoststate = HOST_UP;
|
newhoststate = HOST_UP;
|
||||||
newportstate = PORT_OPEN;
|
newportstate = PORT_OPEN;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
newhoststate = HOST_UP;
|
newhoststate = HOST_UP;
|
||||||
newportstate = PORT_OPEN;
|
newportstate = PORT_OPEN;
|
||||||
|
|||||||
Reference in New Issue
Block a user