From 6db3026d475e2768373cf94f175f2a484b853388 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sat, 9 Jun 2012 14:39:44 +0200 Subject: [PATCH] using our_name from ppp_settings (only used in server mode and disabled by default) --- src/netif/ppp/auth.c | 4 ++-- src/netif/ppp/options.c | 2 +- src/netif/ppp/ppp_impl.h | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/netif/ppp/auth.c b/src/netif/ppp/auth.c index 04f96dc2..440fae0c 100644 --- a/src/netif/ppp/auth.c +++ b/src/netif/ppp/auth.c @@ -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 */ diff --git a/src/netif/ppp/options.c b/src/netif/ppp/options.c index 8a766fdc..b0f3fdc3 100644 --- a/src/netif/ppp/options.c +++ b/src/netif/ppp/options.c @@ -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 */ diff --git a/src/netif/ppp/ppp_impl.h b/src/netif/ppp/ppp_impl.h index 1da3d78a..6b19cd0a 100644 --- a/src/netif/ppp/ppp_impl.h +++ b/src/netif/ppp/ppp_impl.h @@ -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 */ };