From: Mark Wooding Date: Sat, 14 Jan 2012 20:01:52 +0000 (+0000) Subject: server/tun-slip.c: Treat ESC END as an error, and junk the packet. X-Git-Tag: 1.0.0pre11~47 X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/commitdiff_plain/c85c17123f9713266341520e86e0acb31fad4031 server/tun-slip.c: Treat ESC END as an error, and junk the packet. The code already treats ESC ESC as an error, so this is for consistency. --- diff --git a/server/tun-slip.c b/server/tun-slip.c index e807662a..c945998d 100644 --- a/server/tun-slip.c +++ b/server/tun-slip.c @@ -121,9 +121,10 @@ static void t_read(int fd, unsigned mode, void *v) case SL_END: if (st & ST_BAD) ; - else if (st & ST_ESC) + else if (st & ST_ESC) { a_warn("TUN", "%s", p_ifname(t->p), "slip", "escape-end", A_END); - else if (q == t->buf) { + st |= ST_BAD; + } else if (q == t->buf) { T( trace(T_TUNNEL, "tun-slip: empty packet"); ) } else { IF_TRACING(T_TUNNEL, {