diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-12-18 08:03:08 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-12-18 08:03:08 -0200 |
commit | da4f91a9207cc5b958adbca75415266700b4b8c6 (patch) | |
tree | b492da3aa386af326d2d37f6b47def4548448852 | |
parent | 67de15fc5004793920f0a8f12ba86547814514ce (diff) | |
download | pfsense-da4f91a9207cc5b958adbca75415266700b4b8c6.zip pfsense-da4f91a9207cc5b958adbca75415266700b4b8c6.tar.gz |
Add openvpn interfaces to group when they are created, it should fix #4110
-rw-r--r-- | etc/inc/openvpn.inc | 9 |
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"; |