]> www.tinc-vpn.org Git - tinc/blobdiff - src/net_setup.c
Enable AutoConnect by default.
[tinc] / src / net_setup.c
index 455f66c68d78ee55ddded5e5d9f1b59b3a9aedba..73d46c998e2db1d9bf20c6d69289c3ac15405183 100644 (file)
@@ -687,15 +687,8 @@ bool setup_myself_reloadable(void) {
                keylifetime = 3600;
        }
 
-       config_t *cfg = lookup_config(config_tree, "AutoConnect");
-
-       if(cfg) {
-               if(!get_config_bool(cfg, &autoconnect)) {
-                       // Some backwards compatibility with when this option was an int
-                       int val = 0;
-                       get_config_int(cfg, &val);
-                       autoconnect = val;
-               }
+       if (!get_config_bool(lookup_config(config_tree, "AutoConnect"), &autoconnect)) {
+               autoconnect = true;
        }
 
        get_config_bool(lookup_config(config_tree, "DisableBuggyPeers"), &disablebuggypeers);