The AllowedPublicKeys option should not apply to multicast listeners

Another fix for #1141.
This commit is contained in:
Neil Alexander 2024-09-29 21:38:56 +01:00
parent d1b849588f
commit 377bc664c9
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
4 changed files with 28 additions and 19 deletions

View file

@ -150,7 +150,14 @@ func (c *Core) GetSessions() []SessionInfo {
// parsed from a string of the form e.g. "tcp://a.b.c.d:e". In the case of a
// link-local address, the interface should be provided as the second argument.
func (c *Core) Listen(u *url.URL, sintf string) (*Listener, error) {
return c.links.listen(u, sintf)
return c.links.listen(u, sintf, false)
}
// ListenLocal starts a listener, like the Listen function, but is used for
// more trustworthy situations where you want to ignore AllowedPublicKeys, i.e.
// with multicast listeners.
func (c *Core) ListenLocal(u *url.URL, sintf string) (*Listener, error) {
return c.links.listen(u, sintf, true)
}
// Address gets the IPv6 address of the Yggdrasil node. This is always a /128