4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-06-17 00:06:08 +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

@ -353,13 +353,13 @@ func (c *Conn) Close() (err error) {
// LocalAddr returns the complete node ID of the local side of the connection.
// This is always going to return your own node's node ID.
func (c *Conn) LocalAddr() net.Addr {
return c.core.boxPub
return &c.core.boxPub
}
// RemoteAddr returns the complete node ID of the remote side of the connection.
func (c *Conn) RemoteAddr() net.Addr {
if c.session != nil {
return c.session.theirPermPub
return &c.session.theirPermPub
}
return nil
}

View File

@ -41,5 +41,5 @@ func (l *Listener) Close() (err error) {
// Addr returns the address of the listener
func (l *Listener) Addr() net.Addr {
return l.core.boxPub
return &l.core.boxPub
}