X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/blobdiff_plain/898975ee8b892cadd04322dc884b3bb8d491c8f8..f4c9c08fb4a558d880d183b65a12de3770c3860b:/server/tun-slip.c diff --git a/server/tun-slip.c b/server/tun-slip.c index e807662a..85e9cd84 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, { @@ -289,7 +290,7 @@ static tunnel *t_create(peer *p, int fd, char **ifn) dstr d = DSTR_INIT; unsigned char ch; tunnel *t; - static const char end[] = { SL_END, SL_END }; + static const octet end[] = { SL_END, SL_END }; /* --- Try to find a spare static interface --- */