diff options
author | 2001-02-04 01:14:27 +0000 | |
---|---|---|
committer | 2001-02-04 01:14:27 +0000 | |
commit | 351e2deb99145142a134a32eae70a6f8d1e94be6 (patch) | |
tree | 478f98ebca75fee1351b917af67a4cdf3b41fd3d | |
parent | Untangle some cunfusion between the CLOSE_STAYDOWN, CLOSE_LCP and (diff) | |
download | wireguard-openbsd-351e2deb99145142a134a32eae70a6f8d1e94be6.tar.xz wireguard-openbsd-351e2deb99145142a134a32eae70a6f8d1e94be6.zip |
Make the MPPE MasterKey Invalid messages a bit clearer (it now
complains that you can't do MPPE without CHAP81).
Reset MasterKeyValid to zero when we hit phase DEAD.
-rw-r--r-- | usr.sbin/ppp/ppp/bundle.c | 6 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp/mppe.c | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/usr.sbin/ppp/ppp/bundle.c b/usr.sbin/ppp/ppp/bundle.c index 589fe2b73f2..6b219913101 100644 --- a/usr.sbin/ppp/ppp/bundle.c +++ b/usr.sbin/ppp/ppp/bundle.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: bundle.c,v 1.51 2001/02/04 01:14:23 brian Exp $ + * $OpenBSD: bundle.c,v 1.52 2001/02/04 01:14:27 brian Exp $ */ #include <sys/param.h> @@ -97,6 +97,7 @@ #include "ip.h" #include "iface.h" #include "server.h" +#include "mppe.h" #define SCATTER_SEGMENTS 7 /* version, datalink, name, physical, throughput, throughput, device */ @@ -128,8 +129,9 @@ bundle_NewPhase(struct bundle *bundle, u_int new) switch (new) { case PHASE_DEAD: - log_DisplayPrompts(); bundle->phase = new; + MPPE_MasterKeyValid = 0; + log_DisplayPrompts(); break; case PHASE_ESTABLISH: diff --git a/usr.sbin/ppp/ppp/mppe.c b/usr.sbin/ppp/ppp/mppe.c index cfcc1c453d8..f6a78aad8fb 100644 --- a/usr.sbin/ppp/ppp/mppe.c +++ b/usr.sbin/ppp/ppp/mppe.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: mppe.c,v 1.3 2000/12/29 22:37:25 brian Exp $ + * $OpenBSD: mppe.c,v 1.4 2001/02/04 01:14:28 brian Exp $ */ #include <sys/types.h> @@ -234,7 +234,7 @@ MPPEInitOptsOutput(struct lcp_opt *o, const struct ccp_config *cfg) if (!MPPE_MasterKeyValid) { log_Printf(LogCCP, "MPPE: MasterKey is invalid," - " MPPE is capable only with CHAP81 authentication\n"); + " MPPE is available only with CHAP81 authentication\n"); *(u_int32_t *)o->data = htonl(0x0); return; } @@ -321,7 +321,7 @@ MPPEInitInput(struct lcp_opt *o) log_Printf(LogCCP, "MPPE: InitInput\n"); if (!MPPE_MasterKeyValid) { - log_Printf(LogERROR, "MPPE: InitInput: MasterKey is invalid!!!!\n"); + log_Printf(LogWARN, "MPPE: Cannot initialise without CHAP81\n"); return NULL; } @@ -363,7 +363,7 @@ MPPEInitOutput(struct lcp_opt *o) log_Printf(LogCCP, "MPPE: InitOutput\n"); if (!MPPE_MasterKeyValid) { - log_Printf(LogERROR, "MPPE: InitOutput: MasterKey is invalid!!!!\n"); + log_Printf(LogWARN, "MPPE: Cannot initialise without CHAP81\n"); return NULL; } |