o If all CCPs are disabled & denied, don't send a REQ - just enter
STOPPED state waiting for the peer to say something.
This commit is contained in:
parent
245086a062
commit
1df0a3b93b
@ -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 */
|
||||
}
|
||||
|
@ -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 *);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user