aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/service/service_tunnel.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--service/service_tunnel.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/service/service_tunnel.go b/service/service_tunnel.go
index 02be70aa..750a4302 100644
--- a/service/service_tunnel.go
+++ b/service/service_tunnel.go
@@ -7,11 +7,9 @@ package service
import (
"bufio"
- "encoding/binary"
"fmt"
"log"
"strings"
- "unsafe"
"golang.org/x/sys/windows/svc"
"golang.org/x/sys/windows/svc/debug"
@@ -44,12 +42,6 @@ type tunnelService struct {
debug bool
}
-func htonl(val uint32) uint32 {
- bytes := make([]byte, 4)
- binary.BigEndian.PutUint32(bytes, val)
- return *(*uint32)(unsafe.Pointer(&bytes[0]))
-}
-
func (service *tunnelService) Execute(args []string, r <-chan svc.ChangeRequest, changes chan<- svc.Status) (svcSpecificEC bool, exitCode uint32) {
changes <- svc.Status{State: svc.StartPending}
@@ -140,7 +132,7 @@ func (service *tunnelService) Execute(args []string, r <-chan svc.ChangeRequest,
}
ipcSetOperation(device, bufio.NewReader(strings.NewReader(uapiConf)))
- err = bindSocketToMonitoredDefault(device.net.bind.(*NativeBind))
+ err = monitorDefaultRoutes(device.net.bind.(*NativeBind))
if err != nil {
logger.Error.Println("Unable to bind sockets to default route:", err)
changes <- svc.Status{State: svc.StopPending}