summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ppp/ppp/cbcp.c26
-rw-r--r--usr.sbin/ppp/ppp/ppp.814
2 files changed, 33 insertions, 7 deletions
diff --git a/usr.sbin/ppp/ppp/cbcp.c b/usr.sbin/ppp/ppp/cbcp.c
index 3f27abebd26..21f7e9328f3 100644
--- a/usr.sbin/ppp/ppp/cbcp.c
+++ b/usr.sbin/ppp/ppp/cbcp.c
@@ -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.9 1999/06/02 15:58:40 brian Exp $
+ * $Id: cbcp.c,v 1.10 1999/07/27 13:50:20 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);
diff --git a/usr.sbin/ppp/ppp/ppp.8 b/usr.sbin/ppp/ppp/ppp.8
index c512b4e2461..7bbed554631 100644
--- a/usr.sbin/ppp/ppp/ppp.8
+++ b/usr.sbin/ppp/ppp/ppp.8
@@ -1,4 +1,4 @@
-.\" $Id: ppp.8,v 1.60 1999/07/27 00:31:27 brian Exp $
+.\" $Id: ppp.8,v 1.61 1999/07/27 13:50:20 brian Exp $
.Dd 20 September 1995
.nr XX \w'\fC00'
.Dt PPP 8
@@ -3443,6 +3443,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 ...
@@ -3469,7 +3478,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