summaryrefslogtreecommitdiffhomepage
path: root/src/conn.go
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2017-10-27 10:43:37 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2017-10-27 10:43:37 +0200
commit0485c34c8e20e4f7ea19bd3c3f52d2f4717caead (patch)
tree72c360fc84cb731bfa84fc627063debdf69ecd2c /src/conn.go
parentfd6f2e1f554cb545c7c554b56e2ac77308822680 (diff)
Fixed message header length in conn_linux
Diffstat (limited to 'src/conn.go')
-rw-r--r--src/conn.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/conn.go b/src/conn.go
index 012e24e..b2caffb 100644
--- a/src/conn.go
+++ b/src/conn.go
@@ -45,15 +45,20 @@ func UpdateUDPListener(device *Device) error {
// close existing sockets
if netc.bind != nil {
+ println("close bind")
if err := netc.bind.Close(); err != nil {
return err
}
+ netc.bind = nil
+ println("closed")
}
// open new sockets
if device.tun.isUp.Get() {
+ println("creat")
+
// bind to new port
var err error
@@ -69,6 +74,8 @@ func UpdateUDPListener(device *Device) error {
return err
}
+ println("okay")
+
// clear cached source addresses
for _, peer := range device.peers {