From 06e3c8c997f52bc9f93b36d9933d67130abf0ef0 Mon Sep 17 00:00:00 2001 From: Arceliar Date: Wed, 24 Jan 2018 18:45:29 -0600 Subject: [PATCH] if you could go ahead and include your port number in your multicast announcements, that'd be great --- src/yggdrasil/debug.go | 4 ++-- yggdrasil.go | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/yggdrasil/debug.go b/src/yggdrasil/debug.go index ead8918b..ca330c5a 100644 --- a/src/yggdrasil/debug.go +++ b/src/yggdrasil/debug.go @@ -269,8 +269,8 @@ func (c *Core) DEBUG_setupAndStartGlobalUDPInterface(addrport string) { c.udp = &iface } -func (c *Core) DEBUG_getGlobalUDPAddr() net.Addr { - return c.udp.sock.LocalAddr() +func (c *Core) DEBUG_getGlobalUDPAddr() *net.UDPAddr { + return c.udp.sock.LocalAddr().(*net.UDPAddr) } func (c *Core) DEBUG_maybeSendUDPKeys(saddr string) { diff --git a/yggdrasil.go b/yggdrasil.go index b59b3d41..fd579902 100644 --- a/yggdrasil.go +++ b/yggdrasil.go @@ -169,6 +169,8 @@ func (n *node) announce() { panic(err) } var anAddr net.UDPAddr + udpAddr := n.core.DEBUG_getGlobalUDPAddr() + anAddr.Port = udpAddr.Port destAddr, err := net.ResolveUDPAddr("udp6", multicastAddr) if err != nil { panic(err)