fix IP allocation logic

This commit is contained in:
Callan Bryant 2020-03-02 19:27:54 +00:00
parent 11ed6be6d1
commit 6700a47a75
No known key found for this signature in database
GPG Key ID: C31FA9DF3ACBFFAA

View File

@ -126,7 +126,7 @@ func (conf DsnetConfig) ChooseIP() (net.IP, error) {
IP[j] = IP[j] | byte(i>>shift)
}
if conf.IPAllocated(IP) {
if ! conf.IPAllocated(IP) {
return IP, nil
}
}