From e4812ba9cc4262ec921944f02639ce55781d7497 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 24 Dec 2009 12:42:21 +0100 Subject: [PATCH] Allow Port and PMTUDiscovery options in tinc.conf, always enable PMTUDiscovery by default. --- src/net_setup.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/net_setup.c b/src/net_setup.c index 0718a8c..369c8a4 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -246,7 +246,8 @@ bool setup_myself(void) { if(!read_rsa_private_key()) return false; - if(!get_config_string(lookup_config(myself->connection->config_tree, "Port"), &myport)) + if(!get_config_string(lookup_config(config_tree, "Port"), &myport) + && !get_config_string(lookup_config(myself->connection->config_tree, "Port"), &myport)) myport = xstrdup("655"); /* Read in all the subnets specified in the host configuration file */ @@ -296,11 +297,10 @@ bool setup_myself(void) { } else routing_mode = RMODE_ROUTER; - // Enable PMTUDiscovery by default if we are in router mode. - - choice = routing_mode == RMODE_ROUTER; + choice = true; get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice); - if(choice) + get_config_bool(lookup_config(config_tree, "PMTUDiscovery"), &choice); + if(choice) myself->options |= OPTION_PMTU_DISCOVERY; get_config_bool(lookup_config(config_tree, "PriorityInheritance"), &priorityinheritance); -- 2.25.1