mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-17 20:24:24 +00:00
improved PAP control structure size
This commit is contained in:
parent
0bdc27186d
commit
0234c62c3e
@ -163,9 +163,9 @@ void upap_authwithpeer(ppp_pcb *pcb, char *user, char *password) {
|
||||
|
||||
/* Save the username and password we're given */
|
||||
pcb->upap.us_user = user;
|
||||
pcb->upap.us_userlen = strlen(user);
|
||||
pcb->upap.us_userlen = LWIP_MIN(strlen(user), 0xff);
|
||||
pcb->upap.us_passwd = password;
|
||||
pcb->upap.us_passwdlen = strlen(password);
|
||||
pcb->upap.us_passwdlen = LWIP_MIN(strlen(password), 0xff);
|
||||
pcb->upap.us_transmits = 0;
|
||||
|
||||
/* Lower layer up yet? */
|
||||
|
@ -99,18 +99,18 @@
|
||||
#if PAP_SUPPORT
|
||||
typedef struct upap_state {
|
||||
char *us_user; /* User */
|
||||
int us_userlen; /* User length */
|
||||
u8_t us_userlen; /* User length */
|
||||
char *us_passwd; /* Password */
|
||||
int us_passwdlen; /* Password length */
|
||||
int us_clientstate; /* Client state */
|
||||
u8_t us_passwdlen; /* Password length */
|
||||
u8_t us_clientstate; /* Client state */
|
||||
#if PPP_SERVER
|
||||
int us_serverstate; /* Server state */
|
||||
u8_t us_serverstate /* Server state */
|
||||
#endif /* PPP_SERVER */
|
||||
u_char us_id; /* Current id */
|
||||
int us_timeouttime; /* Timeout (seconds) for auth-req retrans. */
|
||||
int us_transmits; /* Number of auth-reqs sent */
|
||||
int us_maxtransmits; /* Maximum number of auth-reqs to send */
|
||||
int us_reqtimeout; /* Time to wait for auth-req from peer */
|
||||
u8_t us_id; /* Current id */
|
||||
u8_t us_timeouttime; /* Timeout (seconds) for auth-req retrans. */
|
||||
u8_t us_transmits; /* Number of auth-reqs sent */
|
||||
u8_t us_maxtransmits; /* Maximum number of auth-reqs to send */
|
||||
u8_t us_reqtimeout; /* Time to wait for auth-req from peer */
|
||||
} upap_state;
|
||||
#endif /* PAP_SUPPORT */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user