X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_setup.c;h=d6d145ae1721b9a5d09dd9f7d44914e258883194;hp=f53127b5989085c5753018e8bb4eb9d7f020e503;hb=a39a9506cd041a7092a98498b362eaacfd2f33c3;hpb=1bb5a284fec8c538f8ba243d4f9b2e46f68cd7e8 diff --git a/src/net_setup.c b/src/net_setup.c index f53127b5..d6d145ae 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -1,7 +1,7 @@ /* net_setup.c -- Setup. Copyright (C) 1998-2005 Ivo Timmermans, - 2000-2006 Guus Sliepen + 2000-2008 Guus Sliepen 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, "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) @@ -608,6 +608,8 @@ void close_network_connections(void) execute_script("tinc-down", envp); + if(myport) free(myport); + for(i = 0; i < 4; i++) free(envp[i]);