mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-26 00:35:21 +00:00
PPP, PPPoL2TP, removed unnecessary single pbuf
Removed ppp_singlebuf() in pppol2tp_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. Added ppp_singlebuf() in pppol2tp_dispatch_control_packet() because we do not support chained pbuf in L2TP control packet.
This commit is contained in:
parent
421582d747
commit
bc99f75b53
@ -376,7 +376,6 @@ static void pppol2tp_input(void *arg, struct udp_pcb *pcb, struct pbuf *p, const
|
||||
}
|
||||
|
||||
/* printf("-----------\nL2TP INPUT, %d\n", p->len); */
|
||||
p = ppp_singlebuf(p);
|
||||
|
||||
/* L2TP header */
|
||||
if (p->len < sizeof(hflags) + sizeof(tunnel_id) + sizeof(session_id) ) {
|
||||
@ -519,6 +518,7 @@ static void pppol2tp_dispatch_control_packet(pppol2tp_pcb *l2tp, u16_t port, str
|
||||
return;
|
||||
}
|
||||
|
||||
p = ppp_singlebuf(p);
|
||||
inp = (u8_t*)p->payload;
|
||||
/* Decode AVPs */
|
||||
while (p->len > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user