pap.c (45193) | pap.c (45220) |
---|---|
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.32 1999/02/20 01:12:45 brian Exp $ | 21 * $Id: pap.c,v 1.33 1999/03/31 14:21:45 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> --- 121 unchanged lines hidden (view full) --- 151} 152 153void 154pap_Input(struct physical *p, struct mbuf *bp) 155{ 156 struct authinfo *authp = &p->dl->pap; 157 u_char nlen, klen, *key; 158 | 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> --- 121 unchanged lines hidden (view full) --- 151} 152 153void 154pap_Input(struct physical *p, struct mbuf *bp) 155{ 156 struct authinfo *authp = &p->dl->pap; 157 u_char nlen, klen, *key; 158 |
159 if (bundle_Phase(p->dl->bundle) != PHASE_NETWORK && 160 bundle_Phase(p->dl->bundle) != PHASE_AUTHENTICATE) { 161 log_Printf(LogPHASE, "Unexpected pap input - dropped !\n"); 162 mbuf_Free(bp); 163 return; 164 } 165 |
|
159 if ((bp = auth_ReadHeader(authp, bp)) == NULL && 160 ntohs(authp->in.hdr.length) == 0) { 161 log_Printf(LogWARN, "Pap Input: Truncated header !\n"); 162 return; 163 } 164 165 if (authp->in.hdr.code == 0 || authp->in.hdr.code > MAXPAPCODE) { 166 log_Printf(LogPHASE, "Pap Input: %d: Bad PAP code !\n", authp->in.hdr.code); --- 76 unchanged lines hidden --- | 166 if ((bp = auth_ReadHeader(authp, bp)) == NULL && 167 ntohs(authp->in.hdr.length) == 0) { 168 log_Printf(LogWARN, "Pap Input: Truncated header !\n"); 169 return; 170 } 171 172 if (authp->in.hdr.code == 0 || authp->in.hdr.code > MAXPAPCODE) { 173 log_Printf(LogPHASE, "Pap Input: %d: Bad PAP code !\n", authp->in.hdr.code); --- 76 unchanged lines hidden --- |