summaryrefslogtreecommitdiff
path: root/gatchat/ppp_lcp.c
diff options
context:
space:
mode:
authorMartin Xu <martin.xu@intel.com>2011-02-15 14:53:16 +0800
committerDenis Kenzior <denkenz@gmail.com>2011-02-16 12:01:39 -0600
commit694589f51dd77d7cdd0ec65638ad9a1279f546fe (patch)
treefb564f89445b226755ab6caefa505ac56f6d1896 /gatchat/ppp_lcp.c
parentcd0ba4819400b451e24932f3f023b4bf9adda8e6 (diff)
PPP: Use default ACCM (0xffffffff) to trasmit
Using my Huawei EM770W modem, if set ACCM as 0x00000000, RXJ- event breaks PPP link, after IP package transmit for a while. Using default ACCM, the issue can be fixed. I tested it at China Unicom networks.
Diffstat (limited to 'gatchat/ppp_lcp.c')
-rw-r--r--gatchat/ppp_lcp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c
index cc3e231e..3c6dda8e 100644
--- a/gatchat/ppp_lcp.c
+++ b/gatchat/ppp_lcp.c
@@ -105,8 +105,7 @@ static void lcp_generate_config_options(struct lcp_data *lcp)
static void lcp_reset_config_options(struct lcp_data *lcp)
{
- lcp->req_options = REQ_OPTION_ACCM;
- lcp->accm = 0;
+ /* Using the default ACCM */
lcp_generate_config_options(lcp);
}
@@ -147,6 +146,7 @@ static void lcp_rca(struct pppcp_data *pppcp, const struct pppcp_packet *packet)
ppp_option_iter_init(&iter, packet);
while (ppp_option_iter_next(&iter) == TRUE) {
+ const guint8 *data = ppp_option_iter_get_data(&iter);
switch (ppp_option_iter_get_type(&iter)) {
case ACCM:
/*
@@ -155,7 +155,9 @@ static void lcp_rca(struct pppcp_data *pppcp, const struct pppcp_packet *packet)
* which control characters MUST remain mapped when
* the peer sends them.
*/
- ppp_set_recv_accm(pppcp_get_ppp(pppcp), 0);
+
+ ppp_set_recv_accm(pppcp_get_ppp(pppcp),
+ get_host_long(data));
break;
default:
break;