mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-28 08:37:28 +00:00
moved remote_name and explicit_remote global variable to ppp_settings
This commit is contained in:
parent
2da930ba4c
commit
6b8c78bacc
@ -238,19 +238,13 @@ bool refuse_mschap_v2 = 0; /* Don't wanna auth. ourselves with MS-CHAPv2 */
|
||||
bool refuse_mschap = 1; /* Don't wanna auth. ourselves with MS-CHAP */
|
||||
bool refuse_mschap_v2 = 1; /* Don't wanna auth. ourselves with MS-CHAPv2 */
|
||||
#endif /* MSCHAP_SUPPORT */
|
||||
#endif /* MOVED TO ppp_settings */
|
||||
#if 0 /* UNUSED */
|
||||
bool usehostname = 0; /* Use hostname for our_name */
|
||||
bool auth_required = 0; /* Always require authentication from peer */
|
||||
bool allow_any_ip = 0; /* Allow peer to use any IP address */
|
||||
#endif /* UNUSED */
|
||||
bool explicit_remote = 0; /* User specified explicit remote name */
|
||||
#if 0 /* UNUSED */
|
||||
bool explicit_user = 0; /* Set if "user" option supplied */
|
||||
bool explicit_passwd = 0; /* Set if "password" option supplied */
|
||||
#endif /* UNUSED */
|
||||
char remote_name[MAXNAMELEN]; /* Peer's name for authentication */
|
||||
#if 0 /* UNUSED */
|
||||
static char *uafname; /* name of most recent +ua file */
|
||||
|
||||
extern char *crypt (const char *, const char *);
|
||||
|
@ -492,8 +492,8 @@ chap_respond(struct chap_client_state *cs, int id,
|
||||
slprintf(rname, sizeof(rname), "%.*v", nlen, pkt + clen + 1);
|
||||
|
||||
/* Microsoft doesn't send their name back in the PPP packet */
|
||||
if (explicit_remote || (remote_name[0] != 0 && rname[0] == 0))
|
||||
strlcpy(rname, remote_name, sizeof(rname));
|
||||
if (ppp_settings.explicit_remote || (ppp_settings.remote_name[0] != 0 && rname[0] == 0))
|
||||
strlcpy(rname, ppp_settings.remote_name, sizeof(rname));
|
||||
|
||||
/* get secret for authenticating ourselves with the specified host */
|
||||
if (!get_secret(0, cs->name, rname, secret, &secret_len, 0)) {
|
||||
|
@ -1451,9 +1451,9 @@ int len;
|
||||
}
|
||||
|
||||
/* In case the remote doesn't give us his name. */
|
||||
if (explicit_remote ||
|
||||
(remote_name[0] != '\0' && vallen == len))
|
||||
strlcpy(rhostname, remote_name, sizeof (rhostname));
|
||||
if (ppp_settings.explicit_remote ||
|
||||
(ppp_settings.remote_name[0] != '\0' && vallen == len))
|
||||
strlcpy(rhostname, ppp_settings.remote_name, sizeof (rhostname));
|
||||
|
||||
/*
|
||||
* Get the secret for authenticating ourselves with
|
||||
|
@ -255,9 +255,6 @@ struct epdisc {
|
||||
/*
|
||||
* Global variables.
|
||||
*/
|
||||
extern char remote_name[MAXNAMELEN]; /* Peer's name for authentication */
|
||||
extern bool explicit_remote;/* remote_name specified with remotename opt */
|
||||
|
||||
extern int unsuccess; /* # unsuccessful connection attempts */
|
||||
extern int listen_time; /* time to listen first (ms) */
|
||||
extern int status; /* exit status for pppd */
|
||||
@ -431,8 +428,8 @@ struct ppp_settings {
|
||||
#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 */
|
||||
/* FIXME: make it a compile time option */
|
||||
char remote_name[MAXNAMELEN + 1]; /* Peer's name for authentication */
|
||||
};
|
||||
|
||||
struct ppp_settings ppp_settings;
|
||||
|
Loading…
x
Reference in New Issue
Block a user