From 470f2f02489cb02fd102a29bd84b27870ba111ad Mon Sep 17 00:00:00 2001 From: snow flurry Date: Mon, 21 Mar 2022 19:40:24 -0700 Subject: [PATCH] Cleanup error handling --- tun/tun_netbsd.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tun/tun_netbsd.go b/tun/tun_netbsd.go index f95bfce..a5bc9db 100644 --- a/tun/tun_netbsd.go +++ b/tun/tun_netbsd.go @@ -157,7 +157,7 @@ func CreateTUN(name string, mtu int) (Device, error) { if errno != 0 { tunfile.Close() - return nil, fmt.Errorf("Unable to put into IFHEAD mode: %v", errno) + return nil, fmt.Errorf("Unable to put into multi-af mode: %v", errno) } _, _, errno = unix.Syscall( @@ -169,7 +169,7 @@ func CreateTUN(name string, mtu int) (Device, error) { if errno != 0 || ifheadmode == 0 { tunfile.Close() - return nil, fmt.Errorf("Unable to validate IFHEAD mode: %v (ifheadmode = %d)", errno, ifheadmode) + return nil, fmt.Errorf("Unable to validate multi-af mode: %v", errno) } if err == nil && name == "tun" {