X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_setup.c;h=cb702cc3d687feab79ebce756143e4794c2367a6;hp=502e7b20b1dddc8a29f63ae78993f19677056707;hb=df3220a1549f992cbf4a9b6e67c1e67b69896c7d;hpb=56aad1bb486675ff9aba31418708cc179eea0381 diff --git a/src/net_setup.c b/src/net_setup.c index 502e7b20..cb702cc3 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -1,7 +1,7 @@ /* net_setup.c -- Setup. - Copyright (C) 1998-2003 Ivo Timmermans , - 2000-2003 Guus Sliepen + Copyright (C) 1998-2005 Ivo Timmermans , + 2000-2005 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 @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: net_setup.c,v 1.1.2.50 2003/12/20 21:25:17 guus Exp $ + $Id$ */ #include "system.h" @@ -286,6 +286,8 @@ bool setup_myself(void) if(get_config_bool(lookup_config(myself->connection->config_tree, "TCPOnly"), &choice) && choice) myself->options |= OPTION_TCPONLY; + get_config_bool(lookup_config(config_tree, "BlockingTCP"), &blockingtcp); + if(get_config_bool(lookup_config(myself->connection->config_tree, "PMTUDiscovery"), &choice) && choice) myself->options |= OPTION_PMTU_DISCOVERY; @@ -343,8 +345,6 @@ bool setup_myself(void) get_config_bool(lookup_config(config_tree, "Hostnames"), &hostnames); - get_config_bool(lookup_config(config_tree, "StrictSource"), &strictsource); - /* Generate packet encryption key */ if(get_config_string @@ -462,6 +462,10 @@ bool setup_myself(void) for(i = 0; i < 5; i++) free(envp[i]); + /* Run subnet-up scripts for our own subnets */ + + subnet_update(myself, NULL, true); + /* Open sockets */ get_config_string(lookup_config(config_tree, "BindToAddress"), &address); @@ -568,8 +572,10 @@ void close_network_connections(void) terminate_connection(c, false); } - if(myself && myself->connection) + if(myself && myself->connection) { + subnet_update(myself, NULL, false); terminate_connection(myself->connection, false); + } for(i = 0; i < listen_sockets; i++) { close(listen_socket[i].tcp);