mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-16 21:26:43 +08:00
PPP: introduce ppp_set_auth_required macro
PPP auth required flag is currently hardcoded to true if PPP is acting as a server and set to false if PPP is acting as a client. This is probably the most wanted behavior, but since we now have the ability to change that at runtime, allow users to do it. It means we can now have a server which asks the client to authenticate or vice versa. This is pretty unusual thought. What we don't support yet is mutual authentication with a different set of user and password per direction which is even less usual.
This commit is contained in:
@@ -453,6 +453,13 @@ struct ppp_pcb_s {
|
||||
#define PPPAUTHTYPE_ANY 0xff
|
||||
void ppp_set_auth(ppp_pcb *pcb, u8_t authtype, const char *user, const char *passwd);
|
||||
|
||||
#if PPP_AUTH_SUPPORT
|
||||
/*
|
||||
* Whether peer is required to authenticate. This is mostly necessary for PPP server support.
|
||||
*/
|
||||
#define ppp_set_auth_required(ppp, boolval) (ppp->settings.auth_required = boolval)
|
||||
#endif /* PPP_AUTH_SUPPORT */
|
||||
|
||||
#if PPP_IPV4_SUPPORT
|
||||
/*
|
||||
* Set PPP interface "our" and "his" IPv4 addresses. This is mostly necessary for PPP server
|
||||
|
||||
Reference in New Issue
Block a user