summaryrefslogtreecommitdiffstats
path: root/gatchat/ppp_lcp.c
diff options
context:
space:
mode:
authorMartin Xu <martin.xu@intel.com>2011-02-12 17:41:13 +0800
committerDenis Kenzior <denkenz@gmail.com>2011-02-14 14:22:32 -0600
commitad16e81aff95c5fd3ab1c0c014aed62d49808ab3 (patch)
tree3a490c38a5950864df120ce31363b2a4eedf8c43 /gatchat/ppp_lcp.c
parent96c2b404501bafecf2b1eab740d554d7710e4db5 (diff)
downloadofono-ad16e81aff95c5fd3ab1c0c014aed62d49808ab3.tar.bz2
PPP: Fix transmit ACCM and receive ACCM mixup
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.
Diffstat (limited to 'gatchat/ppp_lcp.c')
-rw-r--r--gatchat/ppp_lcp.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c
index 3a80a624..cc3e231e 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: