summaryrefslogtreecommitdiffhomepage
path: root/src/tun.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-11-19 13:35:17 +0100
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-11-19 13:35:17 +0100
commitaf464cff00fb9b78499cf4875d687bfa33e12082 (patch)
tree6cb4b40d0301e4fb924d56551661d48de740b2dc /src/tun.go
parentb5ae42349c4fd88022a63006060d72b03aa83b16 (diff)
Better naming of bind helpers
Diffstat (limited to 'src/tun.go')
-rw-r--r--src/tun.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tun.go b/src/tun.go
index 5bdac0e..215022c 100644
--- a/src/tun.go
+++ b/src/tun.go
@@ -47,17 +47,19 @@ 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)
- UpdateUDPListener(device)
+ updateBind(device)
}
}
if event&TUNEventDown != 0 {
if device.tun.isUp.Get() {
+ // stop listening for incomming datagrams
logInfo.Println("Interface set down")
device.tun.isUp.Set(false)
- CloseUDPListener(device)
+ closeBind(device)
}
}
}