]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
openvpnctrl: Force 'modprobe tun' before starting the openvpn daemon.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 Jul 2011 09:42:53 +0000 (11:42 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 Jul 2011 09:42:53 +0000 (11:42 +0200)
src/misc-progs/openvpnctrl.c

index 9112f1f9e0585858cde4737eebb5313cbe9e05ee..758800da16a298b16725a2c33358c7db8f002eea 100644 (file)
@@ -439,7 +439,9 @@ void startNet2Net(char *name) {
        setFirewallRules();
 
        char command[STRING_SIZE];
-       sprintf(command, "/usr/sbin/openvpn --config %s", configfile);
+       snprintf(command, STRING_SIZE-1, "/sbin/modprobe tun");
+       executeCommand(command);
+       snprintf(command, STRING_SIZE-1, "/usr/sbin/openvpn --config %s", configfile);
        executeCommand(command);
 }