mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-29 00:32:51 +00:00
PPP, PPPoE, removed unnecessary single pbuf
Removed ppp_singlebuf() in pppoe_data_input(), chained pbuf are perfectly acceptable for IP data and we are currently supporting them perfectly for PPPoS. The PPP stack itself (LCP, IPCP et al.) does not support chained pbuf and is already calling ppp_singlebuf() just before passing packet to the protocol handler.
This commit is contained in:
parent
5f0e261f2d
commit
bcfaeca373
@ -677,8 +677,6 @@ pppoe_data_input(struct netif *netif, struct pbuf *pb)
|
||||
goto drop;
|
||||
}
|
||||
|
||||
pb = ppp_singlebuf (pb);
|
||||
|
||||
if (pb->len < sizeof(*ph)) {
|
||||
PPPDEBUG(LOG_DEBUG, ("pppoe_data_input: could not get PPPoE header\n"));
|
||||
goto drop;
|
||||
@ -716,7 +714,7 @@ pppoe_data_input(struct netif *netif, struct pbuf *pb)
|
||||
sc->sc_ethif->name[0], sc->sc_ethif->name[1], sc->sc_ethif->num,
|
||||
pb->len, plen));
|
||||
|
||||
if (pb->len < plen) {
|
||||
if (pb->tot_len < plen) {
|
||||
goto drop;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user