Enable PMTUDiscovery only if BOTH sides wants it.
authorMichael Tokarev <mjt@tls.msk.ru>
Sat, 28 Feb 2009 13:37:51 +0000 (16:37 +0300)
committerGuus Sliepen <guus@tinc-vpn.org>
Wed, 4 Mar 2009 20:12:20 +0000 (21:12 +0100)
Don't enable PMTUDiscovery if at least one side does not support it.
Before it was enabled if at least one side supported it, now both are required.

src/protocol_auth.c

index cafe45c08e8951620c71321d2fdff1cad89f9694..9288ec7cb7f4b77060d0700b96332881755a24d1 100644 (file)
@@ -483,7 +483,7 @@ bool send_ack(connection_t *c)
        if((get_config_bool(lookup_config(c->config_tree, "TCPOnly"), &choice) && choice) || myself->options & OPTION_TCPONLY)
                c->options |= OPTION_TCPONLY | OPTION_INDIRECT;
 
-       if((!get_config_bool(lookup_config(c->config_tree, "PMTUDiscovery"), &choice) || choice) || myself->options & OPTION_PMTU_DISCOVERY)
+       if((!get_config_bool(lookup_config(c->config_tree, "PMTUDiscovery"), &choice) || choice) && (myself->options & OPTION_PMTU_DISCOVERY))
                c->options |= OPTION_PMTU_DISCOVERY;
 
        get_config_int(lookup_config(c->config_tree, "Weight"), &c->estimated_weight);