fixed bug #51908: PPPOS uses PBUF_POOL in transmit pathway

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
Simon Goldschmidt 2018-06-12 10:39:46 +02:00
parent 342d0eadfb
commit 31bc2f9b20
3 changed files with 4 additions and 4 deletions

View File

@ -201,7 +201,7 @@ mppe_compress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb, u16_t proto
/* TCP stack requires that we don't change the packet payload, therefore we copy
* the whole packet before encryption.
*/
np = pbuf_alloc(PBUF_RAW, MPPE_OVHD + sizeof(protocol) + (*pb)->tot_len, PBUF_POOL);
np = pbuf_alloc(PBUF_RAW, MPPE_OVHD + sizeof(protocol) + (*pb)->tot_len, PBUF_RAM);
if (!np) {
return ERR_MEM;
}

View File

@ -208,7 +208,7 @@ pppos_write(ppp_pcb *ppp, void *ctx, struct pbuf *p)
LWIP_UNUSED_ARG(ppp);
/* Grab an output buffer. */
nb = pbuf_alloc(PBUF_RAW, 0, PBUF_POOL);
nb = pbuf_alloc(PBUF_RAW, 0, PBUF_RAM);
if (nb == NULL) {
PPPDEBUG(LOG_WARNING, ("pppos_write[%d]: alloc fail\n", ppp->netif->num));
LINK_STATS_INC(link.memerr);
@ -257,7 +257,7 @@ pppos_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *pb, u16_t protocol)
LWIP_UNUSED_ARG(ppp);
/* Grab an output buffer. */
nb = pbuf_alloc(PBUF_RAW, 0, PBUF_POOL);
nb = pbuf_alloc(PBUF_RAW, 0, PBUF_RAM);
if (nb == NULL) {
PPPDEBUG(LOG_WARNING, ("pppos_netif_output[%d]: alloc fail\n", ppp->netif->num));
LINK_STATS_INC(link.memerr);

View File

@ -202,7 +202,7 @@ vj_compress_tcp(struct vjcompress *comp, struct pbuf **pb)
/* TCP stack requires that we don't change the packet payload, therefore we copy
* the whole packet before compression. */
np = pbuf_clone(PBUF_RAW, PBUF_POOL, *pb);
np = pbuf_clone(PBUF_RAW, PBUF_RAM, *pb);
if (!np) {
return (TYPE_IP);
}