From: Guus Sliepen Date: Mon, 23 Oct 2017 19:10:20 +0000 (+0200) Subject: Disable PMTU discovery when TCPOnly is used. X-Git-Tag: release-1.1pre16~60 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=9e7c6d4dce8b87d40cea537fd0b035a2612580e3;p=tinc Disable PMTU discovery when TCPOnly is used. --- diff --git a/src/net_setup.c b/src/net_setup.c index 314fd716..49ea31b6 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -583,7 +583,7 @@ bool setup_myself_reloadable(void) { free(fmode); } - choice = true; + choice = !(myself->options & OPTION_TCPONLY); get_config_bool(lookup_config(config_tree, "PMTUDiscovery"), &choice); if(choice) { diff --git a/src/protocol_auth.c b/src/protocol_auth.c index 68dd0717..56ff3b12 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -801,7 +801,7 @@ bool send_ack(connection_t *c) { c->options |= OPTION_TCPONLY | OPTION_INDIRECT; } - if(myself->options & OPTION_PMTU_DISCOVERY) { + if(myself->options & OPTION_PMTU_DISCOVERY && !(c->options & OPTION_TCPONLY)) { c->options |= OPTION_PMTU_DISCOVERY; }