diff options
author | Giacinto Cifelli <gciofono@gmail.com> | 2018-10-03 05:32:15 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2018-10-03 11:44:03 -0500 |
commit | 6fc119d9eaee5f9cc37a5a7198d1c55ef98fd645 (patch) | |
tree | 0786f0dc52bfcacd5ccd71688490760df462cb73 /gatchat | |
parent | 3317cc6f45da12a3c31a249658497f0505329c4d (diff) | |
download | ofono-6fc119d9eaee5f9cc37a5a7198d1c55ef98fd645.tar.gz |
gatchat: support for auth NONE
Added authentication method G_AT_PPP_AUTH_METHOD_NONE and its handling.
Diffstat (limited to 'gatchat')
-rw-r--r-- | gatchat/gatppp.c | 3 | ||||
-rw-r--r-- | gatchat/gatppp.h | 1 | ||||
-rw-r--r-- | gatchat/ppp_lcp.c | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c index 4a80b4b3..141e2746 100644 --- a/gatchat/gatppp.c +++ b/gatchat/gatppp.c @@ -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; diff --git a/gatchat/gatppp.h b/gatchat/gatppp.h index 213f7e90..dd203c28 100644 --- a/gatchat/gatppp.h +++ b/gatchat/gatppp.h @@ -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, diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c index df9cd0ef..3fe38217 100644 --- a/gatchat/ppp_lcp.c +++ b/gatchat/ppp_lcp.c @@ -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; } |