Open Source Telephony
 help / color / mirror / Atom feed
From: Giacinto Cifelli <gciofono@gmail.com>
To: ofono@ofono.org
Subject: [PATCH 5/6] gatchat: support for auth NONE
Date: Wed, 03 Oct 2018 05:32:15 +0200	[thread overview]
Message-ID: <20181003033215.6283-1-gciofono@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1493 bytes --]

Added authentication method G_AT_PPP_AUTH_METHOD_NONE and its handling.
---
 gatchat/gatppp.c  | 3 ++-
 gatchat/gatppp.h  | 1 +
 gatchat/ppp_lcp.c | 3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)

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;
 		}
-- 
2.17.1


             reply	other threads:[~2018-10-03  3:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03  3:32 Giacinto Cifelli [this message]
2018-10-03 16:45 ` [PATCH 5/6] gatchat: support for auth NONE Denis Kenzior
2018-10-03 18:22   ` Giacinto Cifelli
  -- strict thread matches above, loose matches on Subject: below --
2018-10-02  6:26 [PATCH 1/6] connman-api: added "none" auth_method Giacinto Cifelli
2018-10-02  6:26 ` [PATCH 5/6] gatchat: support for auth NONE Giacinto Cifelli
2018-10-02 23:26   ` Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181003033215.6283-1-gciofono@gmail.com \
    --to=gciofono@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox