mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-03 02:21:58 +00:00
wgengine, magicsock: add a CreateBind method
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:
committed by
David Crawshaw
parent
75e62d318f
commit
34859f8e7d
@@ -15,7 +15,6 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/tailscale/wireguard-go/conn"
|
||||
"github.com/tailscale/wireguard-go/device"
|
||||
"github.com/tailscale/wireguard-go/tun"
|
||||
"github.com/tailscale/wireguard-go/wgcfg"
|
||||
@@ -173,9 +172,7 @@ func newUserspaceEngineAdvanced(logf logger.Logf, tundev tun.Device, routerGen R
|
||||
}
|
||||
logf("ERROR: peer %s has unexpected AllowedIPs: %v", peerKey.ShortString(), allowedIPs)
|
||||
},
|
||||
CreateBind: func(uint16) (conn.Bind, uint16, error) {
|
||||
return e.magicConn, e.magicConn.LocalPort(), nil
|
||||
},
|
||||
CreateBind: e.magicConn.CreateBind,
|
||||
CreateEndpoint: e.magicConn.CreateEndpoint,
|
||||
SkipBindUpdate: true,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user