X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_setup.c;h=3751537e7f1c6febeed73675e584362fa067cc20;hb=54a30e30ad41d7c0e73fcc4e6ff23c3e85af75c4;hp=7896addf847337f30a047f0c6ba93ebdbfbdcbb0;hpb=7926a156e5b118d06295228e57de0cc9de0433b4;p=tinc diff --git a/src/net_setup.c b/src/net_setup.c index 7896addf..3751537e 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -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; @@ -460,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); @@ -566,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);