summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/main.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-11-09 23:21:47 +0000
committerbrian <brian@FreeBSD.org>1999-11-09 23:21:47 +0000
commitf87b3817a2d1c9cce4910b3a14e946899a2632d7 (patch)
treeb2fac59922434fa4b6caa2a33bec4e837ab1c98f /usr.sbin/ppp/main.c
parentdbc696f018d90f81572242c52c51eb5f0f25f84f (diff)
downloadFreeBSD-src-f87b3817a2d1c9cce4910b3a14e946899a2632d7.zip
FreeBSD-src-f87b3817a2d1c9cce4910b3a14e946899a2632d7.tar.gz
Don't recurse into datalink_UpdateSet() after
doing a HangupDone(). The HangupDone() may fuel bundle_CleanDatalinks(), and if so, the bogus UpdateSet() ends up select()ing on a closed descriptor..... Change the main `do/while' loop to a `for' loop so that any `continue's do the bundle_CleanDatalinks() & bundle_IsDead() bit.
Diffstat (limited to 'usr.sbin/ppp/main.c')
-rw-r--r--usr.sbin/ppp/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c
index 2cce11e..cbe0f55 100644
--- a/usr.sbin/ppp/main.c
+++ b/usr.sbin/ppp/main.c
@@ -506,7 +506,7 @@ DoLoop(struct bundle *bundle)
probe_Init(&probe);
- do {
+ for (; !bundle_IsDead(bundle); bundle_CleanDatalinks(bundle)) {
nfds = 0;
FD_ZERO(&rfds);
FD_ZERO(&wfds);
@@ -619,7 +619,7 @@ DoLoop(struct bundle *bundle)
t.tv_usec = 100000;
select(0, NULL, NULL, NULL, &t);
}
- } while (bundle_CleanDatalinks(bundle), !bundle_IsDead(bundle));
+ }
log_Printf(LogDEBUG, "DoLoop done.\n");
}
OpenPOWER on IntegriCloud