if_spppsubr.c (31742) | if_spppsubr.c (32169) |
---|---|
1/* 2 * Synchronous PPP/Cisco link level subroutines. 3 * Keepalive protocol implemented in both Cisco and PPP modes. 4 * 5 * Copyright (C) 1994-1996 Cronyx Engineering Ltd. 6 * Author: Serge Vakulenko, <vak@cronyx.ru> 7 * 8 * Heavily revamped to conform to RFC 1661. 9 * Copyright (C) 1997, Joerg Wunsch. 10 * 11 * This software is distributed with NO WARRANTIES, not even the implied 12 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * 14 * Authors grant any other persons or organisations permission to use 15 * or modify this software as long as this message is kept with the software, 16 * all derivative works or modified versions. 17 * 18 * From: Version 2.4, Thu Apr 30 17:17:21 MSD 1997 19 * | 1/* 2 * Synchronous PPP/Cisco link level subroutines. 3 * Keepalive protocol implemented in both Cisco and PPP modes. 4 * 5 * Copyright (C) 1994-1996 Cronyx Engineering Ltd. 6 * Author: Serge Vakulenko, <vak@cronyx.ru> 7 * 8 * Heavily revamped to conform to RFC 1661. 9 * Copyright (C) 1997, Joerg Wunsch. 10 * 11 * This software is distributed with NO WARRANTIES, not even the implied 12 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * 14 * Authors grant any other persons or organisations permission to use 15 * or modify this software as long as this message is kept with the software, 16 * all derivative works or modified versions. 17 * 18 * From: Version 2.4, Thu Apr 30 17:17:21 MSD 1997 19 * |
20 * $Id: if_spppsubr.c,v 1.28 1997/10/11 11:25:28 joerg Exp $ | 20 * $Id: if_spppsubr.c,v 1.29 1997/12/15 20:31:08 eivind Exp $ |
21 */ 22 23#include "opt_ipx.h" 24 25#include <sys/param.h> 26#include <sys/systm.h> 27#include <sys/kernel.h> 28#include <sys/sockio.h> --- 2843 unchanged lines hidden (view full) --- 2872 sppp_auth_type_name(PPP_CHAP, h->type), 2873 h->ident, ntohs(h->len)); 2874 if (len > 4) 2875 sppp_print_bytes((u_char*) (h+1), len-4); 2876 addlog(">\n"); 2877 } 2878 break; 2879 } | 21 */ 22 23#include "opt_ipx.h" 24 25#include <sys/param.h> 26#include <sys/systm.h> 27#include <sys/kernel.h> 28#include <sys/sockio.h> --- 2843 unchanged lines hidden (view full) --- 2872 sppp_auth_type_name(PPP_CHAP, h->type), 2873 h->ident, ntohs(h->len)); 2874 if (len > 4) 2875 sppp_print_bytes((u_char*) (h+1), len-4); 2876 addlog(">\n"); 2877 } 2878 break; 2879 } |
2880 if (name_len != sppp_strnlen(sp->hisauth.name, AUTHNAMELEN) 2881 || bcmp(name, sp->hisauth.name, name_len) != 0) { 2882 log(LOG_INFO, "%s%d: chap challenge, his name "); 2883 sppp_print_string(name, name_len); 2884 addlog(" != expected "); 2885 sppp_print_string(sp->hisauth.name, 2886 sppp_strnlen(sp->hisauth.name, AUTHNAMELEN)); 2887 addlog("\n"); 2888 } | |
2889 2890 if (debug) { 2891 log(LOG_DEBUG, 2892 "%s%d: chap input <%s id=0x%x len=%d name=", 2893 ifp->if_name, ifp->if_unit, 2894 sppp_auth_type_name(PPP_CHAP, h->type), h->ident, 2895 ntohs(h->len)); 2896 sppp_print_string((char*) name, name_len); --- 27 unchanged lines hidden (view full) --- 2924 addlog(": "); 2925 sppp_print_string((char*)(h + 1), len - 4); 2926 } 2927 addlog("\n"); 2928 } 2929 x = splimp(); 2930 sp->pp_flags &= ~PP_NEEDAUTH; 2931 if (sp->myauth.proto == PPP_CHAP && | 2880 2881 if (debug) { 2882 log(LOG_DEBUG, 2883 "%s%d: chap input <%s id=0x%x len=%d name=", 2884 ifp->if_name, ifp->if_unit, 2885 sppp_auth_type_name(PPP_CHAP, h->type), h->ident, 2886 ntohs(h->len)); 2887 sppp_print_string((char*) name, name_len); --- 27 unchanged lines hidden (view full) --- 2915 addlog(": "); 2916 sppp_print_string((char*)(h + 1), len - 4); 2917 } 2918 addlog("\n"); 2919 } 2920 x = splimp(); 2921 sp->pp_flags &= ~PP_NEEDAUTH; 2922 if (sp->myauth.proto == PPP_CHAP && |
2923 (sp->lcp.opts & (1 << LCP_OPT_AUTH_PROTO)) && |
|
2932 (sp->lcp.protos & (1 << IDX_CHAP)) == 0) { 2933 /* 2934 * We are authenticator for CHAP but didn't 2935 * complete yet. Leave it to tlu to proceed 2936 * to network phase. 2937 */ 2938 splx(x); 2939 break; --- 397 unchanged lines hidden (view full) --- 3337 addlog(": "); 3338 sppp_print_string((char*)(h+1), name_len); 3339 } 3340 addlog("\n"); 3341 } 3342 x = splimp(); 3343 sp->pp_flags &= ~PP_NEEDAUTH; 3344 if (sp->myauth.proto == PPP_PAP && | 2924 (sp->lcp.protos & (1 << IDX_CHAP)) == 0) { 2925 /* 2926 * We are authenticator for CHAP but didn't 2927 * complete yet. Leave it to tlu to proceed 2928 * to network phase. 2929 */ 2930 splx(x); 2931 break; --- 397 unchanged lines hidden (view full) --- 3329 addlog(": "); 3330 sppp_print_string((char*)(h+1), name_len); 3331 } 3332 addlog("\n"); 3333 } 3334 x = splimp(); 3335 sp->pp_flags &= ~PP_NEEDAUTH; 3336 if (sp->myauth.proto == PPP_PAP && |
3337 (sp->lcp.opts & (1 << LCP_OPT_AUTH_PROTO)) && |
|
3345 (sp->lcp.protos & (1 << IDX_PAP)) == 0) { 3346 /* 3347 * We are authenticator for PAP but didn't 3348 * complete yet. Leave it to tlu to proceed 3349 * to network phase. 3350 */ 3351 splx(x); 3352 break; --- 718 unchanged lines hidden --- | 3338 (sp->lcp.protos & (1 << IDX_PAP)) == 0) { 3339 /* 3340 * We are authenticator for PAP but didn't 3341 * complete yet. Leave it to tlu to proceed 3342 * to network phase. 3343 */ 3344 splx(x); 3345 break; --- 718 unchanged lines hidden --- |