Disable PMTU discovery when TCPOnly is used.
[oweals/tinc.git] / src / net_setup.c
index 17c042520c2056909e2a5a5190a7bd6a8ee6031f..8eb3e6056449a33043f9a84af7b0fe3102ee48f1 100644 (file)
@@ -588,7 +588,7 @@ static bool setup_myself(void) {
                free(mode);
        }
 
                free(mode);
        }
 
-       choice = true;
+       choice = !(myself->options & OPTION_TCPONLY);
        get_config_bool(lookup_config(config_tree, "PMTUDiscovery"), &choice);
 
        if(choice) {
        get_config_bool(lookup_config(config_tree, "PMTUDiscovery"), &choice);
 
        if(choice) {