Deleted Added
full compact
pap.c (43693) pap.c (44159)
1/*
2 * PPP PAP Module
3 *
4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
5 *
6 * Copyright (C) 1993-94, Internet Initiative Japan, Inc.
7 * All rights reserverd.
8 *

--- 4 unchanged lines hidden (view full) ---

13 * distribution and use acknowledge that the software was developed
14 * by the Internet Initiative Japan, Inc. The name of the
15 * IIJ may not be used to endorse or promote products derived
16 * from this software without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
19 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 *
1/*
2 * PPP PAP Module
3 *
4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
5 *
6 * Copyright (C) 1993-94, Internet Initiative Japan, Inc.
7 * All rights reserverd.
8 *

--- 4 unchanged lines hidden (view full) ---

13 * distribution and use acknowledge that the software was developed
14 * by the Internet Initiative Japan, Inc. The name of the
15 * IIJ may not be used to endorse or promote products derived
16 * from this software without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
19 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 * $Id: pap.c,v 1.30 1999/02/02 09:35:17 brian Exp $
21 * $Id: pap.c,v 1.31 1999/02/06 02:54:47 brian Exp $
22 *
23 * TODO:
24 */
25#include <sys/param.h>
26#include <netinet/in.h>
27#include <netinet/in_systm.h>
28#include <netinet/ip.h>
29#include <sys/un.h>

--- 120 unchanged lines hidden (view full) ---

150}
151
152void
153pap_Input(struct physical *p, struct mbuf *bp)
154{
155 struct authinfo *authp = &p->dl->pap;
156 u_char nlen, klen, *key;
157
22 *
23 * TODO:
24 */
25#include <sys/param.h>
26#include <netinet/in.h>
27#include <netinet/in_systm.h>
28#include <netinet/ip.h>
29#include <sys/un.h>

--- 120 unchanged lines hidden (view full) ---

150}
151
152void
153pap_Input(struct physical *p, struct mbuf *bp)
154{
155 struct authinfo *authp = &p->dl->pap;
156 u_char nlen, klen, *key;
157
158 if ((bp = auth_ReadHeader(authp, bp)) == NULL)
158 if ((bp = auth_ReadHeader(authp, bp)) == NULL &&
159 ntohs(authp->in.hdr.length) == 0) {
160 log_Printf(LogWARN, "Pap Input: Truncated header !\n");
159 return;
161 return;
162 }
160
161 if (authp->in.hdr.code == 0 || authp->in.hdr.code > MAXPAPCODE) {
162 log_Printf(LogPHASE, "Pap Input: %d: Bad PAP code !\n", authp->in.hdr.code);
163 mbuf_Free(bp);
164 return;
165 }
166
167 if (authp->in.hdr.code != PAP_REQUEST && authp->id != authp->in.hdr.id &&

--- 71 unchanged lines hidden ---
163
164 if (authp->in.hdr.code == 0 || authp->in.hdr.code > MAXPAPCODE) {
165 log_Printf(LogPHASE, "Pap Input: %d: Bad PAP code !\n", authp->in.hdr.code);
166 mbuf_Free(bp);
167 return;
168 }
169
170 if (authp->in.hdr.code != PAP_REQUEST && authp->id != authp->in.hdr.id &&

--- 71 unchanged lines hidden ---