aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/services/errors.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/errors.go')
-rw-r--r--services/errors.go25
1 files changed, 12 insertions, 13 deletions
diff --git a/services/errors.go b/services/errors.go
index e17cad88..c0588494 100644
--- a/services/errors.go
+++ b/services/errors.go
@@ -1,13 +1,12 @@
/* SPDX-License-Identifier: MIT
*
- * Copyright (C) 2019-2021 WireGuard LLC. All Rights Reserved.
+ * Copyright (C) 2019-2022 WireGuard LLC. All Rights Reserved.
*/
package services
import (
"fmt"
- "syscall"
"golang.org/x/sys/windows"
)
@@ -18,15 +17,15 @@ const (
ErrorSuccess Error = iota
ErrorRingloggerOpen
ErrorLoadConfiguration
- ErrorCreateWintun
- ErrorUAPIListen
+ ErrorCreateNetworkAdapter
ErrorDNSLookup
ErrorFirewall
ErrorDeviceSetConfig
+ ErrorDeviceBringUp
ErrorBindSocketsToDefaultRoutes
+ ErrorMonitorMTUChanges
ErrorSetNetConfig
ErrorDetermineExecutablePath
- ErrorOpenNULFile
ErrorTrackTunnels
ErrorEnumerateSessions
ErrorDropPrivileges
@@ -44,22 +43,22 @@ func (e Error) Error() string {
return "Unable to determine path of running executable"
case ErrorLoadConfiguration:
return "Unable to load configuration from path"
- case ErrorCreateWintun:
- return "Unable to create Wintun interface"
- case ErrorUAPIListen:
- return "Unable to listen on named pipe"
+ case ErrorCreateNetworkAdapter:
+ return "Unable to create network adapter"
case ErrorDNSLookup:
return "Unable to resolve one or more DNS hostname endpoints"
case ErrorFirewall:
return "Unable to enable firewall rules"
case ErrorDeviceSetConfig:
return "Unable to set device configuration"
+ case ErrorDeviceBringUp:
+ return "Unable to bring up adapter"
case ErrorBindSocketsToDefaultRoutes:
return "Unable to bind sockets to default route"
+ case ErrorMonitorMTUChanges:
+ return "Unable to monitor default route MTU for changes"
case ErrorSetNetConfig:
- return "Unable to set interface addresses, routes, dns, and/or interface settings"
- case ErrorOpenNULFile:
- return "Unable to open NUL file"
+ return "Unable to configure adapter network settings"
case ErrorTrackTunnels:
return "Unable to track existing tunnels"
case ErrorEnumerateSessions:
@@ -76,7 +75,7 @@ func (e Error) Error() string {
}
func DetermineErrorCode(err error, serviceError Error) (bool, uint32) {
- if syserr, ok := err.(syscall.Errno); ok {
+ if syserr, ok := err.(windows.Errno); ok {
return false, uint32(syserr)
} else if serviceError != ErrorSuccess {
return true, uint32(serviceError)