summaryrefslogtreecommitdiffstats
path: root/etc/inc/filter.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@pfSense.org>2013-11-12 09:05:46 -0800
committerRenato Botelho <garga@pfSense.org>2013-11-12 09:05:46 -0800
commit7facbef711159b67ae6666c8cd44f21c45c8102b (patch)
tree58edd96d4aeb33b7988e41a0785495430cf2541b /etc/inc/filter.inc
parentc4421dfa4fa1eb6c52f7135378e639e66ec9b238 (diff)
parent62c5794dee353873a07e9a57b28c7b186f0093a0 (diff)
downloadpfsense-7facbef711159b67ae6666c8cd44f21c45c8102b.zip
pfsense-7facbef711159b67ae6666c8cd44f21c45c8102b.tar.gz
Merge pull request #850 from phil-davis/master
Handle comma-separated list of remote networks when making vpn_networks table
Diffstat (limited to 'etc/inc/filter.inc')
-rw-r--r--etc/inc/filter.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 3bfda11..8c18857 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -798,8 +798,11 @@ function filter_get_vpns_list() {
foreach ($config['openvpn']["openvpn-$type"] as $settings) {
if(is_array($settings)) {
if (!isset($settings['disable'])) {
- if (is_subnet($settings['remote_network']) && $settings['remote_network'] <> "0.0.0.0/0")
- $vpns_arr[] = $settings['remote_network'];
+ $remote_networks = explode(',', $settings['remote_network']);
+ foreach ($remote_networks as $remote_network) {
+ if (is_subnet($remote_network) && ($remote_network <> "0.0.0.0/0"))
+ $vpns_arr[] = $remote_network;
+ }
if (is_subnet($settings['tunnel_network']) && $settings['tunnel_network'] <> "0.0.0.0/0")
$vpns_arr[] = $settings['tunnel_network'];
}
OpenPOWER on IntegriCloud