From 2e95a3131c86389ff2e49c1d5e2c534a50d4eb97 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sun, 24 Nov 2019 15:37:37 -0600 Subject: [PATCH] comment out pointless error that prints on some platforms and not others --- src/tuntap/iface.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tuntap/iface.go b/src/tuntap/iface.go index 5eca3ae..463f48f 100644 --- a/src/tuntap/iface.go +++ b/src/tuntap/iface.go @@ -31,7 +31,7 @@ func (w *tunWriter) _write(b []byte) { if n == 0 { return } - written, err = w.tun.iface.Write(append(make([]byte, TUN_OFFSET_BYTES), b[:n]...), TUN_OFFSET_BYTES) + written, err = w.tun.iface.Write(append(make([]byte, TUN_OFFSET_BYTES), b...), TUN_OFFSET_BYTES) util.PutBytes(b) if err != nil { w.tun.Act(w, func() { @@ -41,7 +41,8 @@ func (w *tunWriter) _write(b []byte) { }) } if written != n+TUN_OFFSET_BYTES { - w.tun.log.Errorln("TUN iface write mismatch:", written, "bytes written vs", n, "bytes given") + // FIXME some platforms return the wrong number of bytes written, causing error spam + //w.tun.log.Errorln("TUN iface write mismatch:", written, "bytes written vs", n+TUN_OFFSET_BYTES, "bytes given") } }