projects
/
oweals
/
tinc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
228e7a5
)
Make sure $NAME is set correctly when executing tinc-down script.
author
Guus Sliepen
<guus@tinc-vpn.org>
Mon, 6 Feb 2006 12:30:51 +0000
(12:30 +0000)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Mon, 6 Feb 2006 12:30:51 +0000
(12:30 +0000)
src/net_setup.c
patch
|
blob
|
history
diff --git
a/src/net_setup.c
b/src/net_setup.c
index 3847b3460e6cf29d4fb86c21f01d25bb60de6f2a..e0f156969486351f762f627acf8353762afee8b8 100644
(file)
--- a/
src/net_setup.c
+++ b/
src/net_setup.c
@@
-588,6
+588,12
@@
void close_network_connections(void)
close(listen_socket[i].udp);
}
close(listen_socket[i].udp);
}
+ asprintf(&envp[0], "NETNAME=%s", netname ? : "");
+ asprintf(&envp[1], "DEVICE=%s", device ? : "");
+ asprintf(&envp[2], "INTERFACE=%s", iface ? : "");
+ asprintf(&envp[3], "NAME=%s", myself->name);
+ envp[4] = NULL;
+
exit_requests();
exit_events();
exit_edges();
exit_requests();
exit_events();
exit_edges();
@@
-595,12
+601,6
@@
void close_network_connections(void)
exit_nodes();
exit_connections();
exit_nodes();
exit_connections();
- asprintf(&envp[0], "NETNAME=%s", netname ? : "");
- asprintf(&envp[1], "DEVICE=%s", device ? : "");
- asprintf(&envp[2], "INTERFACE=%s", iface ? : "");
- asprintf(&envp[3], "NAME=%s", myself->name);
- envp[4] = NULL;
-
execute_script("tinc-down", envp);
for(i = 0; i < 4; i++)
execute_script("tinc-down", envp);
for(i = 0; i < 4; i++)