mirror of
https://github.com/slackhq/nebula.git
synced 2025-12-05 18:20:48 -08:00
Allow :: in lighthouse.dns.host config (#1115)
This commit is contained in:
parent
c1711bc9c5
commit
a5a07cc760
2 changed files with 45 additions and 1 deletions
|
|
@ -129,7 +129,12 @@ func dnsMain(l *logrus.Logger, hostMap *HostMap, c *config.C) func() {
|
|||
}
|
||||
|
||||
func getDnsServerAddr(c *config.C) string {
|
||||
return c.GetString("lighthouse.dns.host", "") + ":" + strconv.Itoa(c.GetInt("lighthouse.dns.port", 53))
|
||||
dnsHost := strings.TrimSpace(c.GetString("lighthouse.dns.host", ""))
|
||||
// Old guidance was to provide the literal `[::]` in `lighthouse.dns.host` but that won't resolve.
|
||||
if dnsHost == "[::]" {
|
||||
dnsHost = "::"
|
||||
}
|
||||
return net.JoinHostPort(dnsHost, strconv.Itoa(c.GetInt("lighthouse.dns.port", 53)))
|
||||
}
|
||||
|
||||
func startDns(l *logrus.Logger, c *config.C) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue