From 9752eaa14ccc16556c793f0976b2017689fb472e Mon Sep 17 00:00:00 2001 From: Ziomal12 Date: Wed, 10 Apr 2024 18:34:42 +0200 Subject: [PATCH] Update network.go --- management/server/network.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/management/server/network.go b/management/server/network.go index 53d3a353c29..1a17286579f 100644 --- a/management/server/network.go +++ b/management/server/network.go @@ -125,7 +125,11 @@ func AllocatePeerIP(ipNet net.IPNet, takenIps []net.IP) (net.IP, error) { } // Check if sequential IP assignment is enabled - assignSequentialIPs, _ := strconv.ParseBool(os.Getenv("NETBIRD_ASSIGN_SEQUENTIAL_IPS")) + assignSequentialIPsStr := os.Getenv("NETBIRD_ASSIGN_SEQUENTIAL_IPS") + assignSequentialIPs, err := strconv.Atoi(assignSequentialIPsStr) + if err != nil { + return nil, err + } ips, _ := generateIPs(&ipNet, takenIPMap)