X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fnet_setup.c;h=3751537e7f1c6febeed73675e584362fa067cc20;hp=0c9f27c388821edb00d3aeac63a228199f2e6bfa;hb=c46f56a8b8bb865dd8951441b5acf4701b5b5b09;hpb=f08baa3072e7cd6cee7a2a7cde35b46c85363baf diff --git a/src/net_setup.c b/src/net_setup.c index 0c9f27c3..3751537e 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -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);