mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-25 07:33:11 +00:00
do not allocated pbuf of more than pcb->peer_mru instead of PPP_MRU, to save some memory
This commit is contained in:
parent
4a7f2ffc5e
commit
1b586b69bc
@ -694,7 +694,7 @@ eap_state *esp;
|
||||
}
|
||||
|
||||
/* FIXME: improve buffer size */
|
||||
p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_MRU+PPP_HDRLEN), PBUF_RAM);
|
||||
p = pbuf_alloc(PBUF_RAW, (u16_t)(pcb->peer_mru+PPP_HDRLEN), PBUF_RAM);
|
||||
if(NULL == p)
|
||||
return;
|
||||
|
||||
|
@ -707,7 +707,7 @@ static void fsm_sconfreq(fsm *f, int retransmit) {
|
||||
f->seen_ack = 0;
|
||||
|
||||
/* FIXME: improve buffer size */
|
||||
p = pbuf_alloc(PBUF_RAW, (u16_t)(PPP_MRU+PPP_HDRLEN), PBUF_RAM);
|
||||
p = pbuf_alloc(PBUF_RAW, (u16_t)(pcb->peer_mru+PPP_HDRLEN), PBUF_RAM);
|
||||
if(NULL == p)
|
||||
return;
|
||||
|
||||
|
@ -318,7 +318,7 @@ struct ppp_pcb_s {
|
||||
eap_state eap;
|
||||
#endif /* EAP_SUPPORT */
|
||||
|
||||
int peer_mru; /* currently negotiated peer MRU (per unit) */
|
||||
int peer_mru; /* currently negotiated peer MRU */
|
||||
|
||||
fsm lcp_fsm; /* LCP fsm structure */
|
||||
lcp_options lcp_wantoptions; /* Options that we want to request */
|
||||
|
Loading…
Reference in New Issue
Block a user