diff --git a/src/netif/ppp/pppos.c b/src/netif/ppp/pppos.c index 7bf40f21..e0f0d26f 100644 --- a/src/netif/ppp/pppos.c +++ b/src/netif/ppp/pppos.c @@ -217,6 +217,9 @@ pppos_write(ppp_pcb *ppp, void *ctx, struct pbuf *p) return ERR_MEM; } + /* Set nb->tot_len to actual payload length */ + nb->tot_len = p->len; + /* If the link has been idle, we'll send a fresh flag character to * flush any noise. */ err = ERR_OK; @@ -262,6 +265,9 @@ pppos_netif_output(ppp_pcb *ppp, void *ctx, struct pbuf *pb, u16_t protocol) return ERR_MEM; } + /* Set nb->tot_len to actual payload length */ + nb->tot_len = pb->tot_len; + /* If the link has been idle, we'll send a fresh flag character to * flush any noise. */ err = ERR_OK;