If we've negotiated CBCP and have also specified ``none'' as a possible

callback option, and the server sends us CBCP_NONUM, proceed directly
to the network phase rather than insisting on our configured CBCP
option.

Mostly submitted by: kkphang <phang@dgate.po.my>
This commit is contained in:
Brian Somers 1999-07-27 13:47:59 +00:00
parent b686153c38
commit 8d14e328f9
3 changed files with 45 additions and 9 deletions

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: cbcp.c,v 1.12 1999/05/08 11:06:10 brian Exp $
* $Id: cbcp.c,v 1.13 1999/06/02 15:58:53 brian Exp $
*/
#include <sys/param.h>
@ -356,11 +356,20 @@ cbcp_AdjustResponse(struct cbcp *cbcp, struct cbcp_data *data)
switch (data->type) {
case CBCP_NONUM:
if (cbcp->p->dl->cfg.callback.opmask & CALLBACK_BIT(CALLBACK_NONE))
/*
* if ``none'' is a configured callback possibility
* (ie, ``set callback cbcp none''), go along with the callees
* request
*/
cbcp->fsm.type = CBCP_NONUM;
/*
* If the callee offers no callback, we send our desired response
* anyway. This is what Win95 does - although I can't find this
* behaviour documented in the spec....
* Otherwise, we send our desired response anyway. This seems to be
* what Win95 does - although I can't find this behaviour documented
* in the CBCP spec....
*/
return 1;
case CBCP_CLIENTNUM:
@ -701,7 +710,14 @@ cbcp_Input(struct bundle *bundle, struct link *l, struct mbuf *bp)
cbcp->fsm.id, head->id);
cbcp->fsm.id = head->id;
}
if (cbcp->fsm.state == CBCP_RESPSENT) {
if (cbcp->fsm.type == CBCP_NONUM) {
/*
* Don't change state in case the peer doesn't get our ACK,
* just bring the layer up.
*/
timer_Stop(&cbcp->fsm.timer);
datalink_NCPUp(cbcp->p->dl);
} else if (cbcp->fsm.state == CBCP_RESPSENT) {
timer_Stop(&cbcp->fsm.timer);
datalink_CBCPComplete(cbcp->p->dl);
log_Printf(LogPHASE, "%s: CBCP: Peer will dial back\n", p->dl->name);

View File

@ -1,4 +1,4 @@
.\" $Id: ppp.8,v 1.179 1999/07/26 11:15:11 brian Exp $
.\" $Id: ppp.8,v 1.180 1999/07/27 00:30:32 brian Exp $
.Dd 20 September 1995
.nr XX \w'\fC00'
.Os FreeBSD
@ -3448,6 +3448,15 @@ the peers entry in
Microsofts callback control protocol is used. See
.Dq set cbcp
below.
.Pp
If you wish to negotiate
.Ar cbcp
in client mode but also wish to allow the server to request no callback at
CBCP negotiation time, you must specify both
.Ar cbcp
and
.Ar none
as callback options.
.It E.164 *| Ns Xo
.Ar number Ns Op , Ns Ar number Ns
.No ...
@ -3474,7 +3483,8 @@ themselves.
If the peer does not wish to do callback at all,
.Nm
will accept the fact and continue without callback rather than terminating
the connection. This is required if you wish callback to be optional.
the connection. This is required (in addition to one or more other callback
options) if you wish callback to be optional.
.El
.Pp
.It set cbcp Oo Xo

View File

@ -1,4 +1,4 @@
.\" $Id: ppp.8,v 1.179 1999/07/26 11:15:11 brian Exp $
.\" $Id: ppp.8,v 1.180 1999/07/27 00:30:32 brian Exp $
.Dd 20 September 1995
.nr XX \w'\fC00'
.Os FreeBSD
@ -3448,6 +3448,15 @@ the peers entry in
Microsofts callback control protocol is used. See
.Dq set cbcp
below.
.Pp
If you wish to negotiate
.Ar cbcp
in client mode but also wish to allow the server to request no callback at
CBCP negotiation time, you must specify both
.Ar cbcp
and
.Ar none
as callback options.
.It E.164 *| Ns Xo
.Ar number Ns Op , Ns Ar number Ns
.No ...
@ -3474,7 +3483,8 @@ themselves.
If the peer does not wish to do callback at all,
.Nm
will accept the fact and continue without callback rather than terminating
the connection. This is required if you wish callback to be optional.
the connection. This is required (in addition to one or more other callback
options) if you wish callback to be optional.
.El
.Pp
.It set cbcp Oo Xo