mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-26 00:11:36 +00:00
make offset generic over TUN_OFFSET_BYTES so we can make this platform dependent
This commit is contained in:
parent
f6f9b3ef76
commit
2982b53555
@ -31,7 +31,7 @@ func (w *tunWriter) _write(b []byte) {
|
||||
if n == 0 {
|
||||
return
|
||||
}
|
||||
written, err = w.tun.iface.Write(append([]byte{0, 0, 0, 0}, b[:n]...), TUN_OFFSET_BYTES)
|
||||
written, err = w.tun.iface.Write(append(make([]byte, TUN_OFFSET_BYTES), b[:n]...), TUN_OFFSET_BYTES)
|
||||
util.PutBytes(b)
|
||||
if err != nil {
|
||||
w.tun.Act(w, func() {
|
||||
|
Loading…
Reference in New Issue
Block a user