diff options
author | jim-p <jimp@pfsense.org> | 2014-04-24 10:00:02 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2014-04-24 10:00:02 -0400 |
commit | 77877c7e3c23d919e8387f5a98da69458b59d224 (patch) | |
tree | e81fdf0834b2d1cb593e3958ea68db8ddd02205b | |
parent | 090c70ba46b154b48f86ae3851cee8e08b15a508 (diff) | |
download | pfsense-packages-77877c7e3c23d919e8387f5a98da69458b59d224.tar.gz pfsense-packages-77877c7e3c23d919e8387f5a98da69458b59d224.tar.bz2 pfsense-packages-77877c7e3c23d919e8387f5a98da69458b59d224.zip |
Avoid a PHP error in OpenVPN client export if the user chooses one of the automatic port forward methods but has no port forwards defined.
-rwxr-xr-x | config/openvpn-client-export/openvpn-client-export.inc | 3 | ||||
-rwxr-xr-x | config/openvpn-client-export/openvpn-client-export.xml | 2 | ||||
-rw-r--r-- | pkg_config.10.xml | 2 | ||||
-rw-r--r-- | pkg_config.8.xml | 2 | ||||
-rw-r--r-- | pkg_config.8.xml.amd64 | 2 |
5 files changed, 7 insertions, 4 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc index 87475be5..91b8f198 100755 --- a/config/openvpn-client-export/openvpn-client-export.inc +++ b/config/openvpn-client-export/openvpn-client-export.inc @@ -867,6 +867,9 @@ function openvpn_client_export_find_port_forwards($targetip, $targetport, $targe filter_generate_optcfg_array(); $destinations = array(); + if (!is_array($config['nat']) || !is_array($config['nat']['rule'])) + return $destinations; + foreach ($config['nat']['rule'] as $natent) { $dest = array(); if (!isset($natent['disabled']) diff --git a/config/openvpn-client-export/openvpn-client-export.xml b/config/openvpn-client-export/openvpn-client-export.xml index f8513387..5aec33c1 100755 --- a/config/openvpn-client-export/openvpn-client-export.xml +++ b/config/openvpn-client-export/openvpn-client-export.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" ?> <packagegui> <name>OpenVPN Client Export</name> - <version>1.2.4</version> + <version>1.2.7</version> <title>OpenVPN Client Export</title> <include_file>/usr/local/pkg/openvpn-client-export.inc</include_file> <backup_file></backup_file> diff --git a/pkg_config.10.xml b/pkg_config.10.xml index 32609839..578e7085 100644 --- a/pkg_config.10.xml +++ b/pkg_config.10.xml @@ -1096,7 +1096,7 @@ <depends_on_package_pbi>zip-3.0-##ARCH##.pbi p7zip-9.20.1_2-##ARCH##.pbi</depends_on_package_pbi> <build_port_path>/usr/ports/archivers/p7zip</build_port_path> <build_port_path>/usr/ports/archivers/zip</build_port_path> - <version>1.2.6</version> + <version>1.2.7</version> <status>RELEASE</status> <required_version>2.2</required_version> <config_file>https://packages.pfsense.org/packages/config/openvpn-client-export/openvpn-client-export.xml</config_file> diff --git a/pkg_config.8.xml b/pkg_config.8.xml index 2c55ea36..ffd4943e 100644 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -1453,7 +1453,7 @@ <depends_on_package_pbi>zip-3.0-i386.pbi p7zip-9.20.1-i386.pbi</depends_on_package_pbi> <build_port_path>/usr/ports/archivers/p7zip</build_port_path> <build_port_path>/usr/ports/archivers/zip</build_port_path> - <version>1.2.6</version> + <version>1.2.7</version> <status>RELEASE</status> <required_version>2.0</required_version> <config_file>https://packages.pfsense.org/packages/config/openvpn-client-export/openvpn-client-export.xml</config_file> diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index 3443e297..f8623d59 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -1440,7 +1440,7 @@ <depends_on_package_pbi>zip-3.0-amd64.pbi p7zip-9.20.1-amd64.pbi</depends_on_package_pbi> <build_port_path>/usr/ports/archivers/p7zip</build_port_path> <build_port_path>/usr/ports/archivers/zip</build_port_path> - <version>1.2.6</version> + <version>1.2.7</version> <status>RELEASE</status> <required_version>2.0</required_version> <config_file>https://packages.pfsense.org/packages/config/openvpn-client-export/openvpn-client-export.xml</config_file> |