Allow Port and PMTUDiscovery options in tinc.conf, always enable PMTUDiscovery by default.
This commit is contained in:
parent
7203d5fb07
commit
e4812ba9cc
1 changed files with 5 additions and 5 deletions
|
@ -246,7 +246,8 @@ bool setup_myself(void) {
|
||||||
if(!read_rsa_private_key())
|
if(!read_rsa_private_key())
|
||||||
return false;
|
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");
|
myport = xstrdup("655");
|
||||||
|
|
||||||
/* Read in all the subnets specified in the host configuration file */
|
/* Read in all the subnets specified in the host configuration file */
|
||||||
|
@ -296,11 +297,10 @@ bool setup_myself(void) {
|
||||||
} else
|
} else
|
||||||
routing_mode = RMODE_ROUTER;
|
routing_mode = RMODE_ROUTER;
|
||||||
|
|
||||||
// Enable PMTUDiscovery by default if we are in router mode.
|
choice = true;
|
||||||
|
|
||||||
choice = routing_mode == RMODE_ROUTER;
|
|
||||||
get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice);
|
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;
|
myself->options |= OPTION_PMTU_DISCOVERY;
|
||||||
|
|
||||||
get_config_bool(lookup_config(config_tree, "PriorityInheritance"), &priorityinheritance);
|
get_config_bool(lookup_config(config_tree, "PriorityInheritance"), &priorityinheritance);
|
||||||
|
|
Loading…
Reference in a new issue