gatchat: support for auth NONE

Added authentication method G_AT_PPP_AUTH_METHOD_NONE and its handling.
This commit is contained in:
Giacinto Cifelli 2018-10-03 05:32:15 +02:00 committed by Denis Kenzior
parent 3317cc6f45
commit 6fc119d9ea
3 changed files with 6 additions and 1 deletions

View File

@ -615,7 +615,8 @@ const char *g_at_ppp_get_password(GAtPPP *ppp)
gboolean g_at_ppp_set_auth_method(GAtPPP *ppp, GAtPPPAuthMethod method)
{
if (method != G_AT_PPP_AUTH_METHOD_CHAP &&
method != G_AT_PPP_AUTH_METHOD_PAP)
method != G_AT_PPP_AUTH_METHOD_PAP &&
method != G_AT_PPP_AUTH_METHOD_NONE)
return FALSE;
ppp->auth_method = method;

View File

@ -46,6 +46,7 @@ typedef enum _GAtPPPDisconnectReason {
typedef enum _GAtPPPAuthMethod {
G_AT_PPP_AUTH_METHOD_CHAP,
G_AT_PPP_AUTH_METHOD_PAP,
G_AT_PPP_AUTH_METHOD_NONE,
} GAtPPPAuthMethod;
typedef void (*GAtPPPConnectFunc)(const char *iface, const char *local,

View File

@ -279,6 +279,9 @@ static enum rcr_result lcp_rcr(struct pppcp_data *pppcp,
*new_len = 4;
return RCR_NAK;
case G_AT_PPP_AUTH_METHOD_NONE:
return RCR_REJECT;
}
break;
}