/*ARGSUSED*/ static void lcp_protrej( int unit) { /* * Can't reject LCP! */ error("Received Protocol-Reject for LCP!"); fsm_protreject(&lcp_fsm[unit]); }
static void lcp_rcoderej(fsm *f, u_char *inp, int inlen) { uint16_t proto; fsm *rejfsm; if (inlen < 2) { fsm_log(f, LOG_WARNING, "Received short ProtRej packet."); return; } GETSHORT(proto, inp); rejfsm = NULL; switch (proto) { case PPP_PROTO_LCP: rejfsm = &f->ppp->lcp.fsm; break; case PPP_PROTO_PAP: fsm_log(f, LOG_WARNING, "our PAP packet is rejected"); return; case PPP_PROTO_CHAP: fsm_log(f, LOG_WARNING, "our CHAP packet is rejected"); return; case PPP_PROTO_EAP: fsm_log(f, LOG_ERR, "our EAP packet is rejected"); ppp_stop(f->ppp, "Authentication Required"); break; case PPP_PROTO_NCP | NCP_IPCP: rejfsm = &f->ppp->ipcp.fsm; break; case PPP_PROTO_NCP | NCP_CCP: rejfsm = &f->ppp->ccp.fsm; break; } if (rejfsm == NULL) { fsm_log(f, LOG_WARNING, "Received ProtRej packet for unknown protocol=(%d/%04x)", proto, proto); return; } fsm_protreject(rejfsm); return; }
/* * acscp_protrej - A Protocol-Reject was received for acscp. * * Pretend the lower layer went down, so we shut up. */ static void acscp_protrej(int unit) { fsm_protreject(&acscp_fsm[unit]); }