From 56b912587564e3c12be17e5965e983c50b5c368a Mon Sep 17 00:00:00 2001 From: brian Date: Tue, 13 Feb 2001 12:33:34 +0000 Subject: Don't even look at af_family if accept() returns sa->sa_len == 0 --- usr.sbin/ppp/server.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'usr.sbin') diff --git a/usr.sbin/ppp/server.c b/usr.sbin/ppp/server.c index 5203d7c..d4ec6c4 100644 --- a/usr.sbin/ppp/server.c +++ b/usr.sbin/ppp/server.c @@ -102,6 +102,10 @@ server_Read(struct fdescriptor *d, struct bundle *bundle, const fd_set *fdset) wfd = accept(s->fd, sa, &ssize); if (wfd < 0) log_Printf(LogERROR, "server_Read: accept(): %s\n", strerror(errno)); + else if (sa->sa_len == 0) { + close(wfd); + wfd = -1; + } } else wfd = -1; -- cgit v1.1