Fixed message header length in conn_linux
This commit is contained in:
parent
fd6f2e1f55
commit
0485c34c8e
6 changed files with 54 additions and 26 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue