Enable PMTU discovery by default.
[oweals/tinc.git] / src / net_setup.c
index f53127b5989085c5753018e8bb4eb9d7f020e503..f4246db25984e6a89ea19e12916bffdfca35e09b 100644 (file)
@@ -1,7 +1,7 @@
 /*
     net_setup.c -- Setup.
     Copyright (C) 1998-2005 Ivo Timmermans,
 /*
     net_setup.c -- Setup.
     Copyright (C) 1998-2005 Ivo Timmermans,
-                  2000-2006 Guus Sliepen <guus@tinc-vpn.org>
+                  2000-2008 Guus Sliepen <guus@tinc-vpn.org>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -286,7 +286,7 @@ bool setup_myself(void)
        if(get_config_bool(lookup_config(myself->connection->config_tree, "TCPOnly"), &choice) && choice)
                myself->options |= OPTION_TCPONLY;
 
        if(get_config_bool(lookup_config(myself->connection->config_tree, "TCPOnly"), &choice) && choice)
                myself->options |= OPTION_TCPONLY;
 
-       if(get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) && choice)
+       if(!get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) || choice)
                myself->options |= OPTION_PMTU_DISCOVERY;
 
        if(myself->options & OPTION_TCPONLY)
                myself->options |= OPTION_PMTU_DISCOVERY;
 
        if(myself->options & OPTION_TCPONLY)