mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
PPP L2TP, only skip HDLC header if necessary
RFC 2661 does not specify whether the PPP frame in the L2TP payload should have a HDLC header or not. We handle both cases for compatibility.
This commit is contained in:
parent
7920b6e163
commit
19864a4a08
@ -316,8 +316,16 @@ static void pppol2tp_input(void *arg, struct udp_pcb *pcb, struct pbuf *p, struc
|
|||||||
PPPDEBUG(LOG_DEBUG, ("pppol2tp: session ID mismatch, assigned=%d, received=%d\n", l2tp->remote_session_id, session_id));
|
PPPDEBUG(LOG_DEBUG, ("pppol2tp: session ID mismatch, assigned=%d, received=%d\n", l2tp->remote_session_id, session_id));
|
||||||
goto free_and_return;
|
goto free_and_return;
|
||||||
}
|
}
|
||||||
/* skip address & flags */
|
/*
|
||||||
pbuf_header(p, -(s16_t)2);
|
* skip address & flags if necessary
|
||||||
|
*
|
||||||
|
* RFC 2661 does not specify whether the PPP frame in the L2TP payload should
|
||||||
|
* have a HDLC header or not. We handle both cases for compatibility.
|
||||||
|
*/
|
||||||
|
GETSHORT(hflags, inp);
|
||||||
|
if (hflags == 0xff03) {
|
||||||
|
pbuf_header(p, -(s16_t)2);
|
||||||
|
}
|
||||||
/* Dispatch the packet thereby consuming it. */
|
/* Dispatch the packet thereby consuming it. */
|
||||||
ppp_input(l2tp->ppp, p);
|
ppp_input(l2tp->ppp, p);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user