using our_name from ppp_settings (only used in server mode and disabled by default)

This commit is contained in:
Sylvain Rochet 2012-06-09 14:39:44 +02:00
parent becc306300
commit 6db3026d47
3 changed files with 5 additions and 3 deletions

View File

@ -822,13 +822,13 @@ link_established(unit)
#if PPP_SERVER
#if EAP_SUPPORT
if (go->neg_eap) {
eap_authpeer(unit, our_name);
eap_authpeer(unit, ppp_settings.our_name);
auth |= EAP_PEER;
} else
#endif /* EAP_SUPPORT */
#if CHAP_SUPPORT
if (go->neg_chap) {
chap_auth_peer(unit, our_name, CHAP_DIGEST(go->chap_mdtype));
chap_auth_peer(unit, ppp_settings.our_name, CHAP_DIGEST(go->chap_mdtype));
auth |= CHAP_PEER;
} else
#endif /* CHAP_SUPPORT */

View File

@ -101,8 +101,8 @@ int maxconnect = 0; /* Maximum connect time */
char user[MAXNAMELEN]; /* Username for PAP */
char passwd[MAXSECRETLEN]; /* Password for PAP */
bool persist = 0; /* Reopen link after it goes down */
#endif
char our_name[MAXNAMELEN]; /* Our name for authentication purposes */
#endif
#if DEMAND_SUPPORT
bool demand = 0; /* do dial-on-demand */
#endif /* DEMAND_SUPPORT */

View File

@ -439,7 +439,9 @@ struct ppp_settings {
char user [MAXNAMELEN + 1]; /* Username for PAP */
char passwd [MAXSECRETLEN + 1]; /* Password for PAP, secret for CHAP */
#if PPP_SERVER
char our_name [MAXNAMELEN + 1]; /* Our name for authentication purposes */
#endif /* PPP_SERVER */
/* FIXME: re-enable that */
/* char remote_name[MAXNAMELEN + 1]; */ /* Peer's name for authentication */
};