chiark
/
gitweb
/
~mdw
/
tripe
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
e55761b
)
server/tun-slip.c: Treat ESC END as an error, and junk the packet.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 14 Jan 2012 20:01:52 +0000
(20:01 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 14 Jan 2012 20:01:52 +0000
(20:01 +0000)
The code already treats ESC ESC as an error, so this is for consistency.
server/tun-slip.c
patch
|
blob
|
blame
|
history
diff --git
a/server/tun-slip.c
b/server/tun-slip.c
index e807662a7532b23fe80fd15702b5e1c3169bb3bc..c945998df2229eaac222634b6984b4637dd45cb1 100644
(file)
--- 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, {