diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-12-29 17:42:09 +0100 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-12-29 17:42:09 +0100 |
commit | d73f960aab86b9a12b0b7d18aa80ce1d4f130695 (patch) | |
tree | ec4b6683c1c0b6b28a95b4bdb718dcc3faa0f222 /src/tun.go | |
parent | 996c7c4d8aa11a73718e49b520d16bbf0630a3df (diff) | |
download | wireguard-go-d73f960aab86b9a12b0b7d18aa80ce1d4f130695.tar.gz wireguard-go-d73f960aab86b9a12b0b7d18aa80ce1d4f130695.zip |
Peer timer teardown
Diffstat (limited to 'src/tun.go')
-rw-r--r-- | src/tun.go | 16 |
1 files changed, 4 insertions, 12 deletions
@@ -46,21 +46,13 @@ func (device *Device) RoutineTUNEventReader() { } if event&TUNEventUp != 0 { - if !device.tun.isUp.Get() { - // begin listening for incomming datagrams - logInfo.Println("Interface set up") - device.tun.isUp.Set(true) - updateBind(device) - } + logInfo.Println("Interface set up") + device.Up() } if event&TUNEventDown != 0 { - if device.tun.isUp.Get() { - // stop listening for incomming datagrams - logInfo.Println("Interface set down") - device.tun.isUp.Set(false) - closeBind(device) - } + logInfo.Println("Interface set down") + device.Up() } } } |