diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-11-14 16:27:53 +0100 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-11-14 16:27:53 +0100 |
commit | 69fe86edf0ba371b9b0a54e522ec20d33e0ae129 (patch) | |
tree | d2787000c41a9790feb03f5d5dc40e124d10f697 /src/device.go | |
parent | 566269275ed97812ec909b10ec77c7c037d9e2ea (diff) |
Initial working source caching
Diffstat (limited to 'src/device.go')
-rw-r--r-- | src/device.go | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/device.go b/src/device.go index 033a387..9422d49 100644 --- a/src/device.go +++ b/src/device.go @@ -1,8 +1,6 @@ package main import ( - "golang.org/x/net/ipv4" - "golang.org/x/net/ipv6" "runtime" "sync" "sync/atomic" @@ -23,10 +21,9 @@ type Device struct { } net struct { mutex sync.RWMutex - bind UDPBind // bind interface - port uint16 // listening port - fwmark uint32 // mark value (0 = disabled) - update sync.WaitGroup // the bind was updated (acting as a barrier) + bind UDPBind // bind interface + port uint16 // listening port + fwmark uint32 // mark value (0 = disabled) } mutex sync.RWMutex privateKey NoisePrivateKey @@ -167,7 +164,6 @@ func NewDevice(tun TUNDevice, logLevel int) *Device { device.net.port = 0 device.net.bind = nil - device.net.update.Add(1) // start workers @@ -179,8 +175,6 @@ func NewDevice(tun TUNDevice, logLevel int) *Device { go device.RoutineReadFromTUN() go device.RoutineTUNEventReader() go device.ratelimiter.RoutineGarbageCollector(device.signal.stop) - go device.RoutineReceiveIncomming(ipv4.Version) - go device.RoutineReceiveIncomming(ipv6.Version) return device } |