All of lore.kernel.org
 help / color / mirror / Atom feed
From: martin.xu@intel.com
To: ofono@ofono.org
Subject: [V3 PATCH 1/3] PPP: Fix transmit ACCM and receive ACCM setting issue
Date: Sat, 12 Feb 2011 17:41:13 +0800	[thread overview]
Message-ID: <1297503675-32491-1-git-send-email-martin.xu@intel.com> (raw)
In-Reply-To: <martin.xu@intel.com>

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

From: Martin Xu <martin.xu@intel.com>

Tramsmit ACCM and receive ACCM is mixed up.
According to RFC1662 Section 7.1, ACCM Configuration Option is
used to inform the peer which control characters MUST remain
mapped when the peer sends them.
---
 gatchat/ppp_lcp.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c
index 3a80a62..cc3e231 100644
--- a/gatchat/ppp_lcp.c
+++ b/gatchat/ppp_lcp.c
@@ -149,7 +149,13 @@ static void lcp_rca(struct pppcp_data *pppcp, const struct pppcp_packet *packet)
 	while (ppp_option_iter_next(&iter) == TRUE) {
 		switch (ppp_option_iter_get_type(&iter)) {
 		case ACCM:
-			ppp_set_xmit_accm(pppcp_get_ppp(pppcp), 0);
+			/*
+			 * RFC1662 Section 7.1
+			 * The Configuration Option is used to inform the peer
+			 * which control characters MUST remain mapped when
+			 * the peer sends them.
+			 */
+			ppp_set_recv_accm(pppcp_get_ppp(pppcp), 0);
 			break;
 		default:
 			break;
@@ -263,7 +269,13 @@ static enum rcr_result lcp_rcr(struct pppcp_data *pppcp,
 	while (ppp_option_iter_next(&iter) == TRUE) {
 		switch (ppp_option_iter_get_type(&iter)) {
 		case ACCM:
-			ppp_set_recv_accm(ppp,
+			/*
+			 * RFC1662 Section 7.1
+			 * The Configuration Option is used to inform the peer
+			 * which control characters MUST remain mapped when
+			 * the peer sends them.
+			 */
+			ppp_set_xmit_accm(ppp,
 				get_host_long(ppp_option_iter_get_data(&iter)));
 			break;
 		case AUTH_PROTO:
-- 
1.6.1.3


             reply	other threads:[~2011-02-12  9:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-12  9:41 martin.xu [this message]
2011-02-12  9:41 ` [V3 PATCH 2/3] PPP: Use default ACCM (0xffffffff) to trasmit package martin.xu
2011-02-12  9:41   ` [V3 PATCH 3/3] Huawei: set Huawei EM770W modem device to 00 martin.xu
2011-02-14 20:28     ` Denis Kenzior
2011-02-15  7:03       ` Xu, Martin
2011-02-16 18:04         ` Denis Kenzior
2011-02-17  2:19           ` Marcel Holtmann
2011-02-14 20:26   ` [V3 PATCH 2/3] PPP: Use default ACCM (0xffffffff) to trasmit package Denis Kenzior
2011-02-14 20:25 ` [V3 PATCH 1/3] PPP: Fix transmit ACCM and receive ACCM setting issue 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=1297503675-32491-1-git-send-email-martin.xu@intel.com \
    --to=martin.xu@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.