mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-14 03:20:28 +00:00
if you could go ahead and include your port number in your multicast announcements, that'd be great
This commit is contained in:
parent
a54f6850c8
commit
06e3c8c997
@ -269,8 +269,8 @@ func (c *Core) DEBUG_setupAndStartGlobalUDPInterface(addrport string) {
|
|||||||
c.udp = &iface
|
c.udp = &iface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Core) DEBUG_getGlobalUDPAddr() net.Addr {
|
func (c *Core) DEBUG_getGlobalUDPAddr() *net.UDPAddr {
|
||||||
return c.udp.sock.LocalAddr()
|
return c.udp.sock.LocalAddr().(*net.UDPAddr)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Core) DEBUG_maybeSendUDPKeys(saddr string) {
|
func (c *Core) DEBUG_maybeSendUDPKeys(saddr string) {
|
||||||
|
@ -169,6 +169,8 @@ func (n *node) announce() {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
var anAddr net.UDPAddr
|
var anAddr net.UDPAddr
|
||||||
|
udpAddr := n.core.DEBUG_getGlobalUDPAddr()
|
||||||
|
anAddr.Port = udpAddr.Port
|
||||||
destAddr, err := net.ResolveUDPAddr("udp6", multicastAddr)
|
destAddr, err := net.ResolveUDPAddr("udp6", multicastAddr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user