summaryrefslogtreecommitdiffhomepage
path: root/tun/tun_openbsd.go
diff options
context:
space:
mode:
Diffstat (limited to 'tun/tun_openbsd.go')
-rw-r--r--tun/tun_openbsd.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/tun/tun_openbsd.go b/tun/tun_openbsd.go
index 210830c..ae571b9 100644
--- a/tun/tun_openbsd.go
+++ b/tun/tun_openbsd.go
@@ -204,13 +204,13 @@ func (tun *NativeTun) Events() <-chan Event {
return tun.events
}
-func (tun *NativeTun) Read(buffs [][]byte, sizes []int, offset int) (int, error) {
+func (tun *NativeTun) Read(bufs [][]byte, sizes []int, offset int) (int, error) {
select {
case err := <-tun.errors:
return 0, err
default:
- buff := buffs[0][offset-4:]
- n, err := tun.tunFile.Read(buff[:])
+ buf := bufs[0][offset-4:]
+ n, err := tun.tunFile.Read(buf[:])
if n < 4 {
return 0, err
}
@@ -219,11 +219,11 @@ func (tun *NativeTun) Read(buffs [][]byte, sizes []int, offset int) (int, error)
}
}
-func (tun *NativeTun) Write(buffs [][]byte, offset int) (int, error) {
+func (tun *NativeTun) Write(bufs [][]byte, offset int) (int, error) {
if offset < 4 {
return 0, io.ErrShortBuffer
}
- for i, buf := range buffs {
+ for i, buf := range bufs {
buf = buf[offset-4:]
buf[0] = 0x00
buf[1] = 0x00
@@ -240,7 +240,7 @@ func (tun *NativeTun) Write(buffs [][]byte, offset int) (int, error) {
return i, err
}
}
- return len(buffs), nil
+ return len(bufs), nil
}
func (tun *NativeTun) Close() error {