If we've configured CBCP *and* another not-so-important
CALLBACK protocol and end up agreeing CBCP, DTRT and go into CBCP phase rather than mistakenly terminating as if CBCP wasn't agreed. Problem reported by: Alexander Dubinin <alex@nstl.nnov.ru>
This commit is contained in:
parent
9857e58226
commit
5165af6fa8
@ -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.22 1998/12/15 19:12:24 brian Exp $
|
||||
* $Id: datalink.c,v 1.23 1999/01/08 09:04:58 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -553,13 +553,17 @@ datalink_CBCPFailed(struct datalink *dl)
|
||||
void
|
||||
datalink_AuthOk(struct datalink *dl)
|
||||
{
|
||||
if (dl->physical->link.lcp.his_callback.opmask ==
|
||||
CALLBACK_BIT(CALLBACK_CBCP) ||
|
||||
dl->physical->link.lcp.want_callback.opmask ==
|
||||
CALLBACK_BIT(CALLBACK_CBCP)) {
|
||||
if ((dl->physical->link.lcp.his_callback.opmask &
|
||||
CALLBACK_BIT(CALLBACK_CBCP) ||
|
||||
dl->physical->link.lcp.want_callback.opmask &
|
||||
CALLBACK_BIT(CALLBACK_CBCP)) &&
|
||||
!(dl->physical->link.lcp.want_callback.opmask &
|
||||
CALLBACK_BIT(CALLBACK_AUTH))) {
|
||||
/* We must have agreed CBCP if AUTH isn't there any more */
|
||||
datalink_NewState(dl, DATALINK_CBCP);
|
||||
cbcp_Up(&dl->cbcp);
|
||||
} else if (dl->physical->link.lcp.want_callback.opmask) {
|
||||
/* It's not CBCP */
|
||||
log_Printf(LogPHASE, "%s: Shutdown and await peer callback\n", dl->name);
|
||||
datalink_NewState(dl, DATALINK_LCP);
|
||||
fsm_Close(&dl->physical->link.lcp.fsm);
|
||||
|
@ -17,7 +17,7 @@
|
||||
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Id: lcp.c,v 1.64 1998/09/09 00:03:09 brian Exp $
|
||||
* $Id: lcp.c,v 1.65 1998/10/17 12:28:02 brian Exp $
|
||||
*
|
||||
* TODO:
|
||||
* o Limit data field length by MRU
|
||||
@ -921,7 +921,7 @@ LcpDecodeConfig(struct fsm *fp, u_char *cp, int plen, int mode_type,
|
||||
goto reqreject;
|
||||
break;
|
||||
case MODE_NAK:
|
||||
/* We don't do what he NAKs want, we do things in our preferred order */
|
||||
/* We don't do what he NAKs with, we do things in our preferred order */
|
||||
if (lcp->want_callback.opmask & CALLBACK_BIT(CALLBACK_AUTH))
|
||||
lcp->want_callback.opmask &= ~CALLBACK_BIT(CALLBACK_AUTH);
|
||||
else if (lcp->want_callback.opmask & CALLBACK_BIT(CALLBACK_CBCP))
|
||||
|
Loading…
Reference in New Issue
Block a user