mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-23 17:18:42 +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
@@ -1094,6 +1094,11 @@ func (a *AddrSet) Addrs() []wgcfg.Endpoint {
|
||||
return eps
|
||||
}
|
||||
|
||||
// CreateBind is called by WireGuard to create a UDP binding.
|
||||
func (c *Conn) CreateBind(uint16) (conn.Bind, uint16, error) {
|
||||
return c, c.LocalPort(), nil
|
||||
}
|
||||
|
||||
// CreateEndpoint is called by WireGuard to connect to an endpoint.
|
||||
// The key is the public key of the peer and addrs is a
|
||||
// comma-separated list of UDP ip:ports.
|
||||
|
||||
Reference in New Issue
Block a user