From: Michael Tremer Date: Tue, 19 Jul 2011 09:42:53 +0000 (+0200) Subject: openvpnctrl: Force 'modprobe tun' before starting the openvpn daemon. X-Git-Tag: v2.9-core53~29^2~3^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=81a789d9315219cca58160ea2dbd005287ae4bd3;p=people%2Fms%2Fipfire-2.x.git openvpnctrl: Force 'modprobe tun' before starting the openvpn daemon. --- diff --git a/src/misc-progs/openvpnctrl.c b/src/misc-progs/openvpnctrl.c index 9112f1f9e0..758800da16 100644 --- a/src/misc-progs/openvpnctrl.c +++ b/src/misc-progs/openvpnctrl.c @@ -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); }