Browse Source

initalize extraallowed ips field

Abhishek Kondur 1 year ago
parent
commit
a41fcb5faa
1 changed files with 3 additions and 0 deletions
  1. 3 0
      logic/extpeers.go

+ 3 - 0
logic/extpeers.go

@@ -186,6 +186,9 @@ func CreateExtClient(extclient *models.ExtClient) error {
 	} else if len(extclient.PrivateKey) == 0 && len(extclient.PublicKey) > 0 {
 		extclient.PrivateKey = "[ENTER PRIVATE KEY]"
 	}
+	if extclient.ExtraAllowedIPs == nil {
+		extclient.ExtraAllowedIPs = []string{}
+	}
 
 	parentNetwork, err := GetNetwork(extclient.Network)
 	if err != nil {