summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/bundle.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-03-01 00:43:48 +0000
committerbrian <brian@FreeBSD.org>1999-03-01 00:43:48 +0000
commitb9dfdf02769aa645e956a02d02dae613eb9353c2 (patch)
tree126d35deffd20cca7e44962d6e46303e6ad667ef /usr.sbin/ppp/bundle.c
parent9e86e0d4a8001b8b9031f2322b32aad6c7eaaf1b (diff)
downloadFreeBSD-src-b9dfdf02769aa645e956a02d02dae613eb9353c2.zip
FreeBSD-src-b9dfdf02769aa645e956a02d02dae613eb9353c2.tar.gz
Bring up auto links despite there being no data queued if
we're already in network phase and our autoload values are set with no minimum threshold (the default). Tell the autoload timer that it's ``coming up'' *before* calling AutoLoadTimeout() directly... not after. This prevents the very first demand-dial connection from immediately disconnecting when there are other auto links. Problem diagnosis: Ted Mittelstaedt <tedm@toybox.placo.com>
Diffstat (limited to 'usr.sbin/ppp/bundle.c')
-rw-r--r--usr.sbin/ppp/bundle.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c
index 6e3e3bd..b8162b0 100644
--- a/usr.sbin/ppp/bundle.c
+++ b/usr.sbin/ppp/bundle.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: bundle.c,v 1.45 1999/02/06 02:54:43 brian Exp $
+ * $Id: bundle.c,v 1.46 1999/02/25 11:59:36 brian Exp $
*/
#include <sys/param.h>
@@ -228,6 +228,7 @@ bundle_StartAutoLoadTimer(struct bundle *bundle, int up)
struct datalink *dl;
timer_Stop(&bundle->autoload.timer);
+ bundle->autoload.comingup = up ? 1 : 0;
if (bundle->CleaningUp || bundle->phase != PHASE_NETWORK) {
dl = NULL;
@@ -273,8 +274,6 @@ bundle_StartAutoLoadTimer(struct bundle *bundle, int up)
bundle->autoload.running = 1;
}
-
- bundle->autoload.comingup = up ? 1 : 0;
}
static void
@@ -526,8 +525,9 @@ bundle_UpdateSet(struct descriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n)
else if (bundle->autoload.timer.state != TIMER_RUNNING ||
bundle->autoload.comingup)
bundle_StartAutoLoadTimer(bundle, 0);
- } else if (queued && (bundle->autoload.timer.state != TIMER_RUNNING ||
- !bundle->autoload.comingup))
+ } else if ((bundle_Phase(bundle) == PHASE_NETWORK || queued) &&
+ (bundle->autoload.timer.state != TIMER_RUNNING ||
+ !bundle->autoload.comingup))
bundle_StartAutoLoadTimer(bundle, 1);
}
OpenPOWER on IntegriCloud