diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2011-01-17 18:08:11 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2011-01-17 18:08:11 +0300 |
commit | c783f297faa2453daca7189182a17f913e003ccc (patch) | |
tree | 0527171103dbe568658ea21262e1027b7023bf9a /accel-pppd/ppp/ppp_ipcp.c | |
parent | 56762d9574d05bff9709c856f9f466c51156f549 (diff) | |
download | accel-ppp-c783f297faa2453daca7189182a17f913e003ccc.tar.gz accel-ppp-c783f297faa2453daca7189182a17f913e003ccc.zip |
memory usage optimization
Diffstat (limited to 'accel-pppd/ppp/ppp_ipcp.c')
-rw-r--r-- | accel-pppd/ppp/ppp_ipcp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/accel-pppd/ppp/ppp_ipcp.c b/accel-pppd/ppp/ppp_ipcp.c index 7cdcdbc1..5d66c9d1 100644 --- a/accel-pppd/ppp/ppp_ipcp.c +++ b/accel-pppd/ppp/ppp_ipcp.c @@ -219,7 +219,7 @@ static int send_conf_req(struct ppp_fsm_t *fsm) static void send_conf_ack(struct ppp_fsm_t *fsm) { struct ppp_ipcp_t *ipcp = container_of(fsm, typeof(*ipcp), fsm); - struct ipcp_hdr_t *hdr = (struct ipcp_hdr_t*)ipcp->ppp->unit_buf; + struct ipcp_hdr_t *hdr = (struct ipcp_hdr_t*)ipcp->ppp->buf; hdr->code = CONFACK; @@ -564,12 +564,12 @@ static void ipcp_recv(struct ppp_handler_t*h) return; } - if (ipcp->ppp->unit_buf_size < PPP_HEADERLEN + 2) { + if (ipcp->ppp->buf_size < PPP_HEADERLEN + 2) { log_ppp_warn("IPCP: short packet received\n"); return; } - hdr = (struct ipcp_hdr_t *)ipcp->ppp->unit_buf; + hdr = (struct ipcp_hdr_t *)ipcp->ppp->buf; if (ntohs(hdr->len) < PPP_HEADERLEN) { log_ppp_warn("IPCP: short packet received\n"); return; |