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.0.33~9 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=aaa17884166350b60ab5896bcf408eea665a0404;p=tinc Disable PMTU discovery when TCPOnly is used. --- diff --git a/src/net_setup.c b/src/net_setup.c index 17c04252..8eb3e605 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -588,7 +588,7 @@ static bool setup_myself(void) { free(mode); } - 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 0d21be09..6d1435bc 100644 --- a/src/protocol_auth.c +++ b/src/protocol_auth.c @@ -520,7 +520,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; }