From b5de3f42f0f35a489f6ea1d23dbcf0e15ccebcf0 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sat, 20 Dec 2008 11:39:32 +0000 Subject: [PATCH] uslip: Fix SLIP escape handling. Organization: Straylight/Edgeware From: Mark Wooding In particular, do_slip_in failed to leave ESC mode having handled the escaped character. --- uslip/uslip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uslip/uslip.c b/uslip/uslip.c index a552ba9e..eb60eb69 100644 --- a/uslip/uslip.c +++ b/uslip/uslip.c @@ -521,9 +521,11 @@ static void do_slip_in(int fd, unsigned mode, void *hunoz) switch (buf[i]) { case SL_ESCEND: DPUTC(&slipbuf, SL_END); + slipstate = OK; break; case SL_ESCESC: DPUTC(&slipbuf, SL_ESC); + slipstate = OK; break; case SL_END: moan("found escaped end byte (discard packet and resync"); @@ -531,7 +533,7 @@ static void do_slip_in(int fd, unsigned mode, void *hunoz) slipstate = OK; break; default: - moan("unspected escape char 0x%02x", buf[i]); + moan("unexpected escape char 0x%02x", buf[i]); slipstate = BAD; break; } -- [mdw]