Disable PMTU discovery when TCPOnly is used.
authorGuus Sliepen <guus@tinc-vpn.org>
Mon, 23 Oct 2017 19:10:20 +0000 (21:10 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Mon, 23 Oct 2017 19:10:20 +0000 (21:10 +0200)
src/net_setup.c
src/protocol_auth.c

index 17c042520c2056909e2a5a5190a7bd6a8ee6031f..8eb3e6056449a33043f9a84af7b0fe3102ee48f1 100644 (file)
@@ -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) {
index 0d21be091bb6b2b0f45cc2ec1400b3060e87a305..6d1435bcec381d2ee944fa3c6e365bbb8fd1125c 100644 (file)
@@ -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;
        }