projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Nodes should only be in the node_udp_tree if they are reachable.
[tinc]
/
src
/
net_setup.c
diff --git
a/src/net_setup.c
b/src/net_setup.c
index
502e7b2
..
3751537
100644
(file)
--- a/
src/net_setup.c
+++ b/
src/net_setup.c
@@
-1,7
+1,7
@@
/*
net_setup.c -- Setup.
/*
net_setup.c -- Setup.
- Copyright (C) 1998-200
3 Ivo Timmermans <ivo@o2w.nl
>,
- 2000-200
3 Guus Sliepen <guus@sliepen.eu
.org>
+ Copyright (C) 1998-200
4 Ivo Timmermans <ivo@tinc-vpn.org
>,
+ 2000-200
4 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
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
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"
*/
#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;
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;
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, "Hostnames"), &hostnames);
- get_config_bool(lookup_config(config_tree, "StrictSource"), &strictsource);
-
/* Generate packet encryption key */
if(get_config_string
/* 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]);
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);
/* Open sockets */
get_config_string(lookup_config(config_tree, "BindToAddress"), &address);
@@
-568,8
+572,10
@@
void close_network_connections(void)
terminate_connection(c, false);
}
terminate_connection(c, false);
}
- if(myself && myself->connection)
+ if(myself && myself->connection) {
+ subnet_update(myself, NULL, false);
terminate_connection(myself->connection, false);
terminate_connection(myself->connection, false);
+ }
for(i = 0; i < listen_sockets; i++) {
close(listen_socket[i].tcp);
for(i = 0; i < listen_sockets; i++) {
close(listen_socket[i].tcp);