aboutsummaryrefslogtreecommitdiffstats
path: root/tun/tun_openbsd.go
diff options
context:
space:
mode:
Diffstat (limited to 'tun/tun_openbsd.go')
-rw-r--r--tun/tun_openbsd.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/tun/tun_openbsd.go b/tun/tun_openbsd.go
index 7ef62f4..ff845bc 100644
--- a/tun/tun_openbsd.go
+++ b/tun/tun_openbsd.go
@@ -133,7 +133,7 @@ func CreateTUN(name string, mtu int) (Device, error) {
if err == nil && name == "tun" {
fname := os.Getenv("WG_TUN_NAME_FILE")
if fname != "" {
- os.WriteFile(fname, []byte(tun.(*NativeTun).name+"\n"), 0400)
+ os.WriteFile(fname, []byte(tun.(*NativeTun).name+"\n"), 0o400)
}
}
@@ -219,7 +219,6 @@ func (tun *NativeTun) Read(buff []byte, offset int) (int, error) {
}
func (tun *NativeTun) Write(buff []byte, offset int) (int, error) {
-
// reserve space for header
buff = buff[offset-4:]
@@ -274,7 +273,6 @@ func (tun *NativeTun) setMTU(n int) error {
unix.SOCK_DGRAM,
0,
)
-
if err != nil {
return err
}
@@ -309,7 +307,6 @@ func (tun *NativeTun) MTU() (int, error) {
unix.SOCK_DGRAM,
0,
)
-
if err != nil {
return 0, err
}