summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-12-18 08:03:08 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-12-18 08:03:44 -0200
commit02f65ece135c962b34548f2ec8ed9ed38ba22211 (patch)
tree77b5fe9eebb92728a626b37033a673284a2f1407
parentafe81d69149e8c469abf86858de6e1e4a66412b5 (diff)
downloadpfsense-02f65ece135c962b34548f2ec8ed9ed38ba22211.zip
pfsense-02f65ece135c962b34548f2ec8ed9ed38ba22211.tar.gz
Add openvpn interfaces to group when they are created, it should fix #4110
-rw-r--r--etc/inc/openvpn.inc9
1 files changed, 9 insertions, 0 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index 2c23131..f400e2b 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -445,6 +445,15 @@ function openvpn_reconfigure($mode, $settings) {
/* add the device to the openvpn group */
mwexec("/sbin/ifconfig " . escapeshellarg($devname) . " group openvpn");
+
+ foreach ($config['interfaces'] as $ifname => $ifdata) {
+ if ($ifdata['if'] == $devname) {
+ $grouptmp = link_interface_to_group($ifname);
+ if (!empty($grouptmp))
+ array_walk($grouptmp, 'interface_group_add_member');
+ break;
+ }
+ }
}
$pfile = $g['varrun_path'] . "/openvpn_{$mode_id}.pid";
OpenPOWER on IntegriCloud