This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".
The branch, openvpn-n2n has been updated
via 64f0c3543d8419a708a2a6c2c50620d147213bfe (commit)
from 531f08359c015e39fa51dd9b15ed6abedbc408e6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 64f0c3543d8419a708a2a6c2c50620d147213bfe
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Jul 27 18:40:12 2011 +0200
openvpnctrl: Add option to start all n2n connections at once.
-----------------------------------------------------------------------
Summary of changes:
src/misc-progs/openvpnctrl.c | 38 +++++++++++++++++++++++++++++++++++++-
1 files changed, 37 insertions(+), 1 deletions(-)
Difference in files:
diff --git a/src/misc-progs/openvpnctrl.c b/src/misc-progs/openvpnctrl.c
index 758800d..163386b 100644
--- a/src/misc-progs/openvpnctrl.c
+++ b/src/misc-progs/openvpnctrl.c
@@ -25,7 +25,7 @@ char enableorange[STRING_SIZE] = "off";
char OVPNRED[STRING_SIZE] = "OVPN";
char OVPNBLUE[STRING_SIZE] = "OVPN_BLUE_";
char OVPNORANGE[STRING_SIZE] = "OVPN_ORANGE_";
-char WRAPPERVERSION[STRING_SIZE] = "ipfire-2.1.2";
+char WRAPPERVERSION[STRING_SIZE] = "ipfire-2.2.0";
struct connection_struct {
char name[STRING_SIZE];
@@ -60,6 +60,12 @@ void usage(void)
printf(" kills/stops OpenVPN\n");
printf(" -r --restart\n");
printf(" restarts OpenVPN (implicitly creates chains and firewall rules)\n");
+ printf(" -sn2n --start-net-2-net\n");
+ printf(" starts all net2net connections\n");
+ printf(" you may pass a connection name to the switch to only start a specific one\n");
+ printf(" -kn2n --kill-net-2-net\n");
+ printf(" kills all net2net connections\n");
+ printf(" you may pass a connection name to the switch to only start a specific one\n");
printf(" -d --display\n");
printf(" displays OpenVPN status to syslog\n");
printf(" -fwr --firewall-rules\n");
@@ -482,6 +488,28 @@ void killNet2Net(char *name) {
exit(0);
}
+void startAllNet2Net() {
+ connection *conn = getConnections();
+
+ while(conn) {
+ startNet2Net(conn->name);
+ conn = conn->next;
+ }
+
+ exit(0);
+}
+
+void killAllNet2Net() {
+ connection *conn = getConnections();
+
+ while(conn) {
+ killNet2Net(conn->name);
+ conn = conn->next;
+ }
+
+ exit(0);
+}
+
void displayopenvpn(void) {
char command[STRING_SIZE];
@@ -533,6 +561,14 @@ int main(int argc, char *argv[]) {
startDaemon();
return 0;
}
+ else if( (strcmp(argv[1], "-sn2n") == 0) || (strcmp(argv[1], "--start-net-2-net") == 0) ) {
+ startAllNet2Net();
+ return 0;
+ }
+ else if( (strcmp(argv[1], "-kn2n") == 0) || (strcmp(argv[1], "--kill-net-2-net") == 0) ) {
+ killAllNet2Net();
+ return 0;
+ }
else if( (strcmp(argv[1], "-sdo") == 0) || (strcmp(argv[1], "--start-daemon-only") == 0) ) {
startDaemon();
return 0;
hooks/post-receive
--
IPFire 2.x development tree