mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-17 17:10:03 +00:00
d518f5f307
Don't process input data if PPPoS is closed, it helps using pppos_input() from a different context to prevent pppos_input() to modify PPPoS RX machine state on a closed PPPoS session. It also prevents allocating pbuf (which are going to be tossed out by PPP core) and parsing serial input on a closed session. It only mitigates the fact that this function is actually NOT thread safe in absolutely all cases, it does not fix it but it helps for a low cost. For example user application should never call pppos_input() while pppos_connect() or pppos_listen() is currently running because both of them are freeing any input pbuf left over from the last session before resetting the PPPoS state, they really have to to prevent pbuf leaks. We cannot fix that easily because we don't have spinlock with an irqsave/irqrestore helper for IRQ contexts. Mutex cannot be used in interrupt contexts (or again, with an IRQ mutex helper). We are going to improve the documentation on this point. |
||
---|---|---|
.. | ||
api | ||
core | ||
include | ||
netif | ||
FILES |