aboutsummaryrefslogtreecommitdiff
path: root/src/tun.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/tun.go')
-rw-r--r--src/tun.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tun.go b/src/tun.go
index 54253b4..394ba9a 100644
--- a/src/tun.go
+++ b/src/tun.go
@@ -50,7 +50,9 @@ func (device *Device) RoutineTUNEventReader() {
// begin listening for incomming datagrams
logInfo.Println("Interface set up")
device.tun.isUp.Set(true)
- updateBind(device)
+ if err := updateBind(device); err != nil {
+ logInfo.Println("Failed to bind UDP socket:", err)
+ }
}
}
@@ -59,7 +61,9 @@ func (device *Device) RoutineTUNEventReader() {
// stop listening for incomming datagrams
logInfo.Println("Interface set down")
device.tun.isUp.Set(false)
- closeBind(device)
+ if err := closeBind(device); err != nil {
+ logInfo.Println("Failed to close UDP socket:", err)
+ }
}
}
}