summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/ccp.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-05-23 13:38:09 +0000
committerbrian <brian@FreeBSD.org>1998-05-23 13:38:09 +0000
commit35a7434e269cd17a2450cb27e969145819c4689e (patch)
treec894c5aa24d59ceecf48cedb95f4e783ce515281 /usr.sbin/ppp/ccp.c
parentb76b64615436a954f7dc5ea3ddcc922b2d8d2301 (diff)
downloadFreeBSD-src-35a7434e269cd17a2450cb27e969145819c4689e.zip
FreeBSD-src-35a7434e269cd17a2450cb27e969145819c4689e.tar.gz
o If all CCPs are disabled & denied, don't send a REQ - just enter
STOPPED state waiting for the peer to say something.
Diffstat (limited to 'usr.sbin/ppp/ccp.c')
-rw-r--r--usr.sbin/ppp/ccp.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c
index 12ace1a..3a52abc 100644
--- a/usr.sbin/ppp/ccp.c
+++ b/usr.sbin/ppp/ccp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: ccp.c,v 1.30.2.45 1998/05/21 01:26:05 brian Exp $
+ * $Id: ccp.c,v 1.32 1998/05/21 21:44:21 brian Exp $
*
* TODO:
* o Support other compression protocols
@@ -588,3 +588,15 @@ ccp_Proto(struct ccp *ccp)
return !link2physical(ccp->fsm.link) || !ccp->fsm.bundle->ncp.mp.active ?
PROTO_COMPD : PROTO_ICOMPD;
}
+
+void
+ccp_SetOpenMode(struct ccp *ccp)
+{
+ int f;
+
+ for (f = 0; f < CCP_NEG_TOTAL; f++)
+ if (ccp->cfg.neg[f])
+ ccp->fsm.open_mode = 0;
+
+ ccp->fsm.open_mode = OPEN_PASSIVE; /* Go straight to ST_STOPPED */
+}
OpenPOWER on IntegriCloud