Allow PMTUDiscovery in switch and hub modes again.
[oweals/tinc.git] / src / net_setup.c
index 4eef68eda8f3d3fc37d24819205389e70702a509..d45cb1bbd80ee7906e041debd6c2118235f1effe 100644 (file)
@@ -306,9 +306,12 @@ bool setup_myself(void)
        } else
                routing_mode = RMODE_ROUTER;
 
-       if(routing_mode == RMODE_ROUTER)
-               if(!get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) || choice)
-                       myself->options |= OPTION_PMTU_DISCOVERY;
+       // Enable PMTUDiscovery by default if we are in router mode.
+
+       choice = routing_mode == RMODE_ROUTER;
+       get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice);
+       if(choice)      
+               myself->options |= OPTION_PMTU_DISCOVERY;
 
        get_config_bool(lookup_config(config_tree, "PriorityInheritance"), &priorityinheritance);