Fail with a better error message if lh a hosts is unparsable
This commit is contained in:
@ -33,7 +33,7 @@ type EncWriter interface {
|
||||
SendMessageToAll(t NebulaMessageType, st NebulaMessageSubType, vpnIp uint32, p, nb, out []byte)
|
||||
}
|
||||
|
||||
func NewLightHouse(amLighthouse bool, myIp uint32, ips []string, interval int, nebulaPort int, pc *udpConn, punchBack bool) *LightHouse {
|
||||
func NewLightHouse(amLighthouse bool, myIp uint32, ips []uint32, interval int, nebulaPort int, pc *udpConn, punchBack bool) *LightHouse {
|
||||
h := LightHouse{
|
||||
amLighthouse: amLighthouse,
|
||||
myIp: myIp,
|
||||
@ -46,8 +46,8 @@ func NewLightHouse(amLighthouse bool, myIp uint32, ips []string, interval int, n
|
||||
punchBack: punchBack,
|
||||
}
|
||||
|
||||
for _, rIp := range ips {
|
||||
h.lighthouses[ip2int(net.ParseIP(rIp))] = struct{}{}
|
||||
for _, ip := range ips {
|
||||
h.lighthouses[ip] = struct{}{}
|
||||
}
|
||||
|
||||
return &h
|
||||
|
Reference in New Issue
Block a user