aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2002-07-02 00:47:24 +0000
committerBrian Somers <brian@FreeBSD.org>2002-07-02 00:47:24 +0000
commit3285bb3c97fb88cd6e19ff479ac6f37d471c8bac (patch)
tree8a1fcd2ca50d758a81bc21d0af8dbe94afedb523 /usr.sbin/ppp
parente0efa7966414f9ffde1e04ed5f853df7bf2604b9 (diff)
Notes
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/mppe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ppp/mppe.c b/usr.sbin/ppp/mppe.c
index 2d55ee476cba..606ad0faf4d7 100644
--- a/usr.sbin/ppp/mppe.c
+++ b/usr.sbin/ppp/mppe.c
@@ -691,7 +691,8 @@ MPPEInitInput(struct bundle *bundle, struct fsm_opt *o)
#ifndef NORADIUS
if (*bundle->radius.cfg.file && bundle->radius.mppe.recvkey) {
- mip->keylen = bundle->radius.mppe.recvkeylen;
+ if (mip->keylen > bundle->radius.mppe.recvkeylen)
+ mip->keylen = bundle->radius.mppe.recvkeylen;
if (mip->keylen > sizeof mip->mastkey)
mip->keylen = sizeof mip->mastkey;
memcpy(mip->mastkey, bundle->radius.mppe.recvkey, mip->keylen);
@@ -746,7 +747,8 @@ MPPEInitOutput(struct bundle *bundle, struct fsm_opt *o)
#ifndef NORADIUS
if (*bundle->radius.cfg.file && bundle->radius.mppe.sendkey) {
- mop->keylen = bundle->radius.mppe.sendkeylen;
+ if (mop->keylen > bundle->radius.mppe.sendkeylen)
+ mop->keylen = bundle->radius.mppe.sendkeylen;
if (mop->keylen > sizeof mop->mastkey)
mop->keylen = sizeof mop->mastkey;
memcpy(mop->mastkey, bundle->radius.mppe.sendkey, mop->keylen);