version 1.54, 2002/07/28 19:54:47 |
version 1.55, 2002/07/28 22:16:47 |
Line 2276 sppp_lcp_RCR(struct sppp *sp, struct lcp |
|
Line 2276 sppp_lcp_RCR(struct sppp *sp, struct lcp |
|
if (debug) |
if (debug) |
addlog(" [non-empty]"); |
addlog(" [non-empty]"); |
/* suggest a zero one */ |
/* suggest a zero one */ |
|
#ifndef BROKEN_98 /* XXX - broken Win98 drivers INSIST on having an ASYNC_MAP */ |
p[2] = p[3] = p[4] = p[5] = 0; |
p[2] = p[3] = p[4] = p[5] = 0; |
break; |
break; |
|
#else |
|
continue; |
|
#endif |
|
|
case LCP_OPT_MRU: |
case LCP_OPT_MRU: |
/* |
/* |
Line 5032 sppp_params(struct sppp *sp, int cmd, vo |
|
Line 5036 sppp_params(struct sppp *sp, int cmd, vo |
|
sp->hisauth.name = NULL; |
sp->hisauth.name = NULL; |
return error; |
return error; |
} |
} |
sp->hisauth.name[cfg->hisname_length-1] = 0; |
sp->hisauth.name_len = cfg->hisname_length - 1; |
sp->hisauth.name_len = cfg->hisname_length; |
sp->hisauth.name[sp->hisauth.name_len] = 0; |
} |
} |
if (cfg->hissecret != NULL && cfg->hissecret_length > 0) { |
if (cfg->hissecret != NULL && cfg->hissecret_length > 0) { |
if (cfg->hissecret_length >= MCLBYTES) |
if (cfg->hissecret_length >= MCLBYTES) |
Line 5045 sppp_params(struct sppp *sp, int cmd, vo |
|
Line 5049 sppp_params(struct sppp *sp, int cmd, vo |
|
sp->hisauth.secret = NULL; |
sp->hisauth.secret = NULL; |
return error; |
return error; |
} |
} |
sp->hisauth.secret[cfg->hissecret_length-1] = 0; |
sp->hisauth.secret_len = cfg->hissecret_length - 1; |
sp->hisauth.secret_len = cfg->hissecret_length; |
sp->hisauth.secret[sp->hisauth.secret_len] = 0; |
} |
} |
if (cfg->myname != NULL && cfg->myname_length > 0) { |
if (cfg->myname != NULL && cfg->myname_length > 0) { |
if (cfg->myname_length >= MCLBYTES) |
if (cfg->myname_length >= MCLBYTES) |
Line 5058 sppp_params(struct sppp *sp, int cmd, vo |
|
Line 5062 sppp_params(struct sppp *sp, int cmd, vo |
|
sp->myauth.name = NULL; |
sp->myauth.name = NULL; |
return error; |
return error; |
} |
} |
sp->myauth.name[cfg->myname_length-1] = 0; |
sp->myauth.name_len = cfg->myname_length - 1; |
sp->myauth.name_len = cfg->myname_length; |
sp->myauth.name[sp->myauth.name_len] = 0; |
} |
} |
if (cfg->mysecret != NULL && cfg->mysecret_length > 0) { |
if (cfg->mysecret != NULL && cfg->mysecret_length > 0) { |
if (cfg->mysecret_length >= MCLBYTES) |
if (cfg->mysecret_length >= MCLBYTES) |
Line 5071 sppp_params(struct sppp *sp, int cmd, vo |
|
Line 5075 sppp_params(struct sppp *sp, int cmd, vo |
|
sp->myauth.secret = NULL; |
sp->myauth.secret = NULL; |
return error; |
return error; |
} |
} |
sp->myauth.secret[cfg->mysecret_length-1] = 0; |
sp->myauth.secret_len = cfg->mysecret_length - 1; |
sp->myauth.secret_len = cfg->mysecret_length; |
sp->myauth.secret[sp->myauth.secret_len] = 0; |
} |
} |
sp->myauth.flags = cfg->myauthflags; |
sp->myauth.flags = cfg->myauthflags; |
if (cfg->myauth) |
if (cfg->myauth) |
Line 5081 sppp_params(struct sppp *sp, int cmd, vo |
|
Line 5085 sppp_params(struct sppp *sp, int cmd, vo |
|
if (cfg->hisauth) |
if (cfg->hisauth) |
sp->hisauth.proto = (cfg->hisauth == SPPP_AUTHPROTO_PAP) ? PPP_PAP : PPP_CHAP; |
sp->hisauth.proto = (cfg->hisauth == SPPP_AUTHPROTO_PAP) ? PPP_PAP : PPP_CHAP; |
sp->pp_auth_failures = 0; |
sp->pp_auth_failures = 0; |
|
if (sp->hisauth.proto != 0) |
|
sp->lcp.opts |= (1 << LCP_OPT_AUTH_PROTO); |
|
else |
|
sp->lcp.opts &= ~(1 << LCP_OPT_AUTH_PROTO); |
} |
} |
break; |
break; |
case SPPPGETLCPCFG: |
case SPPPGETLCPCFG: |