From: Guus Sliepen Date: Sat, 12 Sep 2009 11:40:32 +0000 (+0200) Subject: Allow PMTUDiscovery in switch and hub modes again. X-Git-Tag: release-1.0.10~35 X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=7242868b64f9d6f62b6c5bbf1526eb632ed9a4d6 Allow PMTUDiscovery in switch and hub modes again. PMTUDiscovery was disabled in commit d5b56bbba56480b5565ffb38496175a7c1df60ac because tinc did not handle packets larger than the path MTU in switch and hub modes. We now allow it again in preparation of proper support, but default to off. --- diff --git a/src/net_setup.c b/src/net_setup.c index 4eef68ed..d45cb1bb 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -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);