summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-10-17 12:28:08 +0000
committerbrian <brian@FreeBSD.org>1998-10-17 12:28:08 +0000
commita9bd7962502657372612ea13f89f9882d53d78ad (patch)
tree44b235022527cc7398f0b7d9e20c37ee53dc518f /usr.sbin
parentcefa55842c07bac7465c536a399d7af67757a3ee (diff)
downloadFreeBSD-src-a9bd7962502657372612ea13f89f9882d53d78ad.zip
FreeBSD-src-a9bd7962502657372612ea13f89f9882d53d78ad.tar.gz
If the client asks for CBCP, then replies with CBCP_NONUM
to our REQ, allow no dialback - but only if we've ``set cbcp *''.. Suggested by: Andrzej Tobola <san@koziolek.lublin.top.pl>
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/cbcp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/ppp/cbcp.c b/usr.sbin/ppp/cbcp.c
index 27f83e9..a8689f8 100644
--- a/usr.sbin/ppp/cbcp.c
+++ b/usr.sbin/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.1 1998/08/07 18:44:16 brian Exp $
+ * $Id: cbcp.c,v 1.2 1998/08/26 17:39:38 brian Exp $
*/
#include <sys/types.h>
@@ -548,6 +548,13 @@ cbcp_CheckResponse(struct cbcp *cbcp, struct cbcp_data *data)
log_Printf(LogPHASE, "Internal CBCP error - agreed on %d ??!?\n",
(int)cbcp->fsm.type);
return CBCP_ACTION_DOWN;
+ } else if (data->type == CBCP_NONUM && cbcp->fsm.type == CBCP_CLIENTNUM) {
+ /*
+ * Client doesn't want CBCP after all....
+ * We only allow this when ``set cbcp *'' has been specified.
+ */
+ cbcp->fsm.type = CBCP_NONUM;
+ return CBCP_ACTION_ACK;
}
log_Printf(LogCBCP, "Invalid peer RESPONSE\n");
return CBCP_ACTION_REQ;
OpenPOWER on IntegriCloud