Skip to contentSkip to conversation

ppp: discard non-LCP packets when in Establishment phase

PATCH In review Kristen Carlson Accardi 2 participants 2 messages Apr 26, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppp: discard non-LCP packets when in Establishment phase

---
 gatchat/gatppp.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
gatchat/gatppp.c +7 -0
index fc6769c..1547a75 100644
@@ -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 */
Signature · 1 line
1.6.6.1
#1 lore raw

Hi Kristen,

Quoted 3 lines
---
 gatchat/gatppp.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

This one has been applied, thanks.

Regards,
-Denis