diff options
| author | Brian Somers <brian@FreeBSD.org> | 1998-05-23 13:38:09 +0000 |
|---|---|---|
| committer | Brian Somers <brian@FreeBSD.org> | 1998-05-23 13:38:09 +0000 |
| commit | 1df0a3b93b1f185067c59fcf03e89d5d6eebbad5 (patch) | |
| tree | b486973ad2e15c9c2bda508a43ecd1ac6d9cb887 | |
| parent | 245086a062d67a6ce8717bf9d1eb0d4c96f301e7 (diff) | |
Notes
| -rw-r--r-- | usr.sbin/ppp/ccp.c | 14 | ||||
| -rw-r--r-- | usr.sbin/ppp/ccp.h | 3 | ||||
| -rw-r--r-- | usr.sbin/ppp/datalink.c | 6 | ||||
| -rw-r--r-- | usr.sbin/ppp/mp.c | 3 |
4 files changed, 21 insertions, 5 deletions
diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c index 12ace1a49597..3a52abca3301 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 */ +} diff --git a/usr.sbin/ppp/ccp.h b/usr.sbin/ppp/ccp.h index 4652fd93a723..8b1787bc6895 100644 --- a/usr.sbin/ppp/ccp.h +++ b/usr.sbin/ppp/ccp.h @@ -15,7 +15,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ccp.h,v 1.14.2.20 1998/05/01 19:24:00 brian Exp $ + * $Id: ccp.h,v 1.15 1998/05/21 21:44:23 brian Exp $ * * TODO: */ @@ -125,3 +125,4 @@ extern int ccp_Compress(struct ccp *, struct link *, int, u_short, struct mbuf * extern struct mbuf *ccp_Decompress(struct ccp *, u_short *, struct mbuf *); extern u_short ccp_Proto(struct ccp *); extern void ccp_SetupCallbacks(struct ccp *); +extern void ccp_SetOpenMode(struct ccp *); diff --git a/usr.sbin/ppp/datalink.c b/usr.sbin/ppp/datalink.c index 0965f0a5a2d5..4d4c20edc345 100644 --- a/usr.sbin/ppp/datalink.c +++ b/usr.sbin/ppp/datalink.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: datalink.c,v 1.1.2.63 1998/05/16 23:47:24 brian Exp $ + * $Id: datalink.c,v 1.2 1998/05/21 21:44:54 brian Exp $ */ #include <sys/types.h> @@ -452,6 +452,8 @@ datalink_GotAuthname(struct datalink *dl, const char *name, int len) void datalink_AuthOk(struct datalink *dl) { + ccp_SetOpenMode(&dl->physical->link.ccp); + if (dl->physical->link.lcp.want_mrru && dl->physical->link.lcp.his_mrru) { /* we've authenticated in multilink mode ! */ switch (mp_Up(&dl->bundle->ncp.mp, dl)) { @@ -464,7 +466,7 @@ datalink_AuthOk(struct datalink *dl) /* fall through */ case MP_ADDED: /* We're in multilink mode ! */ - dl->physical->link.ccp.fsm.open_mode = OPEN_PASSIVE; + dl->physical->link.ccp.fsm.open_mode = OPEN_PASSIVE; /* override */ break; case MP_FAILED: datalink_AuthNotOk(dl); diff --git a/usr.sbin/ppp/mp.c b/usr.sbin/ppp/mp.c index d022b1befe4e..1ed684699b99 100644 --- a/usr.sbin/ppp/mp.c +++ b/usr.sbin/ppp/mp.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: mp.c,v 1.1.2.29 1998/05/15 18:21:41 brian Exp $ + * $Id: mp.c,v 1.2 1998/05/21 21:47:05 brian Exp $ */ #include <sys/types.h> @@ -272,6 +272,7 @@ mp_Up(struct mp *mp, struct datalink *dl) ipcp_SetLink(&mp->bundle->ncp.ipcp, &mp->link); /* Our lcp's already up 'cos of the NULL parent */ + ccp_SetOpenMode(&mp->link.ccp); fsm_Up(&mp->link.ccp.fsm); fsm_Open(&mp->link.ccp.fsm); |
