Make nebula advertise its dynamic port to lighthouses (#653)

This commit is contained in:
brad-defined 2022-03-15 19:03:56 -04:00 committed by GitHub
parent 312a01dc09
commit 03498a0cb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View file

@ -158,15 +158,6 @@ func Main(c *config.C, configTest bool, buildVersion string, logger *logrus.Logg
}
udpServer.ReloadConfig(c)
udpConns[i] = udpServer
// If port is dynamic, discover it
if port == 0 {
uPort, err := udpServer.LocalAddr()
if err != nil {
return nil, util.NewContextualError("Failed to get listening port", nil, err)
}
port = int(uPort.Port)
}
}
}