summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-01-07 09:11:58 -0200
committerRenato Botelho <garga@FreeBSD.org>2015-01-07 09:24:04 -0200
commit4ab1ffa0b042e4fda87d66de2fd74a1e6db48272 (patch)
tree0fc9593b9841e4199458d0c46af5b14ad9657187
parentbe2d7eb7c6de1ecd1034e2a8dc6a8d38e1fc9d03 (diff)
downloadpfsense-4ab1ffa0b042e4fda87d66de2fd74a1e6db48272.zip
pfsense-4ab1ffa0b042e4fda87d66de2fd74a1e6db48272.tar.gz
Fix #4146:
OpenVPN create the tun/tap interface and, when set an IP address to it, mark it as UP. In some scenarios, when TAP is set as bridge and doesn't have an IP address set on it, it never goes up and tunnel doesn't work. If rc.newwanip is called for this TAP interface, UP flag is set, but, rc.newwanip is not executed when system is booting. Since it's always rename the interface and add it the group, make sure it's up here.
-rw-r--r--etc/inc/openvpn.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index c45256a..2495cde 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -443,8 +443,8 @@ function openvpn_reconfigure($mode, $settings) {
/* rename the device */
mwexec("/sbin/ifconfig " . escapeshellarg($tunname) . " name " . escapeshellarg($devname));
- /* add the device to the openvpn group */
- mwexec("/sbin/ifconfig " . escapeshellarg($devname) . " group openvpn");
+ /* add the device to the openvpn group and make sure it's UP*/
+ mwexec("/sbin/ifconfig " . escapeshellarg($devname) . " group openvpn up");
$ifname = convert_real_interface_to_friendly_interface_name($devname);
$grouptmp = link_interface_to_group($ifname);
OpenPOWER on IntegriCloud