]> git.meshlink.io Git - meshlink/commitdiff
Disable PMTU discovery when TCPOnly is set.
authorEtienne Dechamps <etienne@edechamps.fr>
Sat, 20 Jul 2013 21:59:57 +0000 (22:59 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Sat, 20 Jul 2013 22:36:28 +0000 (00:36 +0200)
Obviously, PMTU discovery doesn't make much sense when we know we'll be
using TCP anyway.

src/protocol_key.c

index 0eeddb861bf675630de4be970d39052a69f6bc9a..a3cf3f51b5965b90923b525494593a971f611e08 100644 (file)
@@ -386,7 +386,7 @@ bool ans_key_h(connection_t *c, const char *request) {
                                update_node_udp(from, &sa);
                        }
 
-                       if(from->options & OPTION_PMTU_DISCOVERY)
+                       if(from->options & OPTION_PMTU_DISCOVERY && !(from->options & OPTION_TCPONLY))
                                send_mtu_probe(from);
                }
 
@@ -435,7 +435,7 @@ bool ans_key_h(connection_t *c, const char *request) {
                update_node_udp(from, &sa);
        }
 
-       if(from->options & OPTION_PMTU_DISCOVERY)
+       if(from->options & OPTION_PMTU_DISCOVERY && !(from->options & OPTION_TCPONLY))
                send_mtu_probe(from);
 
        return true;