Commit 38a2ed32 authored by Mike Hibler's avatar Mike Hibler

Bug fix from Kevin Lahey @ DETER. An aborted connection during an accept

would kill capserver.  This would happen during nmap scans.
parent 95a3a6a7
...@@ -142,7 +142,12 @@ main(int argc, char **argv) ...@@ -142,7 +142,12 @@ main(int argc, char **argv)
if ((clientsock = accept(tcpsock, if ((clientsock = accept(tcpsock,
(struct sockaddr *)&client, (struct sockaddr *)&client,
&length)) < 0) { &length)) < 0) {
syslog(LOG_ERR, "accept failed: %m"); if (errno == ECONNABORTED) {
syslog(LOG_ERR, "accept failed: %m; "
"continuing");
continue;
}
syslog(LOG_ERR, "accept failed: %m; exiting");
exit(1); exit(1);
} }
port = ntohs(client.sin_port); port = ntohs(client.sin_port);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment