4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-07-03 09:37:47 +00:00

Update tuntap module, return pointers

This commit is contained in:
Neil Alexander
2020-02-16 23:21:58 +00:00
parent c107f891d2
commit 63936c11b5
3 changed files with 5 additions and 4 deletions

View File

@ -251,7 +251,8 @@ func (tun *TunAdapter) _wrap(conn *yggdrasil.Conn) (c *tunConn, err error) {
}
c = &s
// Get the remote address and subnet of the other side
remoteNodeID := conn.RemoteAddr().(*crypto.NodeID)
remotePubKey := conn.RemoteAddr().(*crypto.BoxPubKey)
remoteNodeID := crypto.GetNodeID(remotePubKey)
s.addr = *address.AddrForNodeID(remoteNodeID)
s.snet = *address.SubnetForNodeID(remoteNodeID)
// Work out if this is already a destination we already know about