Skip to contentSkip to conversation

Check character flags in ppp_async ldisc

PATCH New Paul Mackerras 1 participant 1 message Nov 6, 2004 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Check character flags in ppp_async ldisc

Although it was checking the per-character error flags supplied by the driver for ordinary characters, the ppp_async line discipline code wasn't checking the flags for special characters, such as the flag and escape characters (~ and }). This patch adds that check.

drivers/net/ppp_async.c +3 -1
diff -urN linux-2.5/drivers/net/ppp_async.c pmac-2.5/drivers/net/ppp_async.c
@@ -911,7 +911,9 @@
 			break;
 
 		c = buf[n];
-		if (c == PPP_FLAG) {
+		if (flags != NULL && flags[n] != 0) {
+			ap->state |= SC_TOSS;
+		} else if (c == PPP_FLAG) {
 			process_input_packet(ap);
 		} else if (c == PPP_ESCAPE) {
 			ap->state |= SC_ESCAPE;