Commit cef8b910 authored by Paul Mackerras's avatar Paul Mackerras Committed by Linus Torvalds

[PATCH] 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.
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7602d249
...@@ -911,7 +911,9 @@ ppp_async_input(struct asyncppp *ap, const unsigned char *buf, ...@@ -911,7 +911,9 @@ ppp_async_input(struct asyncppp *ap, const unsigned char *buf,
break; break;
c = buf[n]; 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); process_input_packet(ap);
} else if (c == PPP_ESCAPE) { } else if (c == PPP_ESCAPE) {
ap->state |= SC_ESCAPE; ap->state |= SC_ESCAPE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment