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