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:
Sylvain Rochet 2015-04-12 20:08:01 +02:00
parent 5f0e261f2d
commit bcfaeca373

View File

@ -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;
}