ppp: discard non-LCP packets in ESTABLISHMENT phase

This commit is contained in:
Kristen Carlson Accardi 2010-04-26 10:28:41 -07:00 committed by Denis Kenzior
parent 30644d8195
commit fce78feb54
1 changed files with 7 additions and 0 deletions

View File

@ -169,6 +169,13 @@ static void ppp_recv(GAtPPP *ppp, struct frame_buffer *frame)
guint16 protocol = ppp_proto(frame->bytes);
guint8 *packet = ppp_info(frame->bytes);
/*
* Any non-LCP packets received during Link Establishment
* phase must be silently discarded.
*/
if (ppp->phase == PPP_PHASE_ESTABLISHMENT && protocol != LCP_PROTOCOL)
return;
switch (protocol) {
case PPP_IP_PROTO:
/* If network is up & open, process the packet, if not, drop */