From f6f9b3ef76bd967ac7ef7fa1a957eb6b3f0c2b82 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sun, 24 Nov 2019 15:01:20 -0600 Subject: [PATCH] include offset in expected bytes written --- src/tuntap/iface.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tuntap/iface.go b/src/tuntap/iface.go index f80ea4f..f1ca0ad 100644 --- a/src/tuntap/iface.go +++ b/src/tuntap/iface.go @@ -40,7 +40,7 @@ func (w *tunWriter) _write(b []byte) { } }) } - if written != n { + if written != n+TUN_OFFSET_BYTES { w.tun.log.Errorln("TUN iface write mismatch:", written, "bytes written vs", n, "bytes given") } }