* [PATCH] ppp: discard non-LCP packets when in Establishment phase
@ 2010-04-26 17:28 Kristen Carlson Accardi
2010-04-26 17:39 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Kristen Carlson Accardi @ 2010-04-26 17:28 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 731 bytes --]
---
gatchat/gatppp.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c
index fc6769c..1547a75 100644
--- a/gatchat/gatppp.c
+++ b/gatchat/gatppp.c
@@ -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 */
--
1.6.6.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-26 17:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-26 17:28 [PATCH] ppp: discard non-LCP packets when in Establishment phase Kristen Carlson Accardi
2010-04-26 17:39 ` Denis Kenzior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox