diff options
author | 2001-07-31 12:11:28 +0000 | |
---|---|---|
committer | 2001-07-31 12:11:28 +0000 | |
commit | 9cedf75aa2f980122f8af10c89e69d08a3fa2178 (patch) | |
tree | ed5b23c18c6683e1e9ecb1f1fd83934d17912cda | |
parent | Documentation fixes per PR 1979 by Kaspar Toomik. (diff) | |
download | wireguard-openbsd-9cedf75aa2f980122f8af10c89e69d08a3fa2178.tar.xz wireguard-openbsd-9cedf75aa2f980122f8af10c89e69d08a3fa2178.zip |
When we receive a CHAP81 challenge response, we always expect the last
byte of the packet to contain '\0'.
Windows 98 gets this wrong, dropping garbage into the last byte and
failing authentication.
Now, we notice this and whinge to our log file that we're compensating
for the corrupt data.
-rw-r--r-- | usr.sbin/ppp/ppp/chap.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/ppp/ppp/chap.c b/usr.sbin/ppp/ppp/chap.c index f6ac3f1f455..b1105ef3d6f 100644 --- a/usr.sbin/ppp/ppp/chap.c +++ b/usr.sbin/ppp/ppp/chap.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: chap.c,v 1.27 2001/06/13 21:33:40 brian Exp $ + * $OpenBSD: chap.c,v 1.28 2001/07/31 12:11:28 brian Exp $ */ #include <sys/param.h> @@ -744,6 +744,11 @@ chap_Input(struct bundle *bundle, struct link *l, struct mbuf *bp) } *ans = chap->auth.id; bp = mbuf_Read(bp, ans + 1, alen); + if (p->link.lcp.want_authtype == 0x81 && ans[alen] != '\0') { + log_Printf(LogWARN, "%s: Compensating for corrupt (Win98?) " + "CHAP81 RESPONSE\n", l->name); + ans[alen] = '\0'; + } ans[alen+1] = '\0'; bp = auth_ReadName(&chap->auth, bp, len); #ifdef HAVE_DES |