Commit b7b143f8 authored by Mike Hibler's avatar Mike Hibler

Make accept() error non-fatal, something is probing capture in such a way

so as to trigger an accept failure.

Also, statically link capture so we don't have to worry about installing
SSL and friends on tipserv machines.
parent e4f1f344
# #
# EMULAB-COPYRIGHT # EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group. # Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved. # All rights reserved.
# #
...@@ -28,7 +28,7 @@ DESTDIR= ...@@ -28,7 +28,7 @@ DESTDIR=
CFLAGS= -g -O2 -DLOG_DROPS -I${OBJDIR} -DLOG_TESTBED=$(LOG_TESTBED) CFLAGS= -g -O2 -DLOG_DROPS -I${OBJDIR} -DLOG_TESTBED=$(LOG_TESTBED)
capture: capture.c capdecls.h capture: capture.c capdecls.h
cc $(CFLAGS) -DUSESOCKETS -DWITHSSL -DPREFIX=\"$(TBROOT)\" -o capture $< -lssl -lcrypto cc -static $(CFLAGS) -DUSESOCKETS -DWITHSSL -DPREFIX=\"$(TBROOT)\" -o capture $< -lssl -lcrypto
capture-nossl: capture.c capdecls.h capture-nossl: capture.c capdecls.h
cc $(CFLAGS) -DUSESOCKETS -DPREFIX=\"$(TBROOT)\" -o capture-nossl $< cc $(CFLAGS) -DUSESOCKETS -DPREFIX=\"$(TBROOT)\" -o capture-nossl $<
......
...@@ -1058,8 +1058,10 @@ clientconnect(void) ...@@ -1058,8 +1058,10 @@ clientconnect(void)
capret_t capret; capret_t capret;
newfd = accept(sockfd, (struct sockaddr *)&tipclient, &length); newfd = accept(sockfd, (struct sockaddr *)&tipclient, &length);
if (newfd < 0) if (newfd < 0) {
die("accept(): accepting new client: %s", geterr(errno)); dolog(LOG_NOTICE, "accept()ing new client: %s", geterr(errno));
return 1;
}
/* /*
* Is there a better way to do this? I suppose we * Is there a better way to do this? I suppose we
......
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