Update copyright notices.
[tinc] / src / net_setup.c
index 7896add..cb702cc 100644 (file)
@@ -1,7 +1,7 @@
 /*
     net_setup.c -- Setup.
-    Copyright (C) 1998-2004 Ivo Timmermans <ivo@tinc-vpn.org>,
-                  2000-2004 Guus Sliepen <guus@tinc-vpn.org>
+    Copyright (C) 1998-2005 Ivo Timmermans <ivo@tinc-vpn.org>,
+                  2000-2005 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
@@ -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);