Private GIT

Skip to content
Snippets Groups Projects
Commit 8a79426e authored by vx3r's avatar vx3r
Browse files

bug, IgnorePersistentKeepalive may be absent

parent 200e47b7
Branches
No related tags found
No related merge requests found
......@@ -167,7 +167,11 @@ func MigratePresharedKey() error {
c.Name = client["name"].(string)
c.Email = client["email"].(string)
c.Enable = client["enable"].(bool)
c.IgnorePersistentKeepalive = client["ignorePersistentKeepalive"].(bool)
if val, ok := client["ignorePersistentKeepalive"]; ok {
c.IgnorePersistentKeepalive = val.(bool)
} else {
c.IgnorePersistentKeepalive = false
}
c.PresharedKey = s["presharedKey"].(string)
c.AllowedIPs = make([]string, 0)
for _, address := range client["allowedIPs"].([]interface{}) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment