summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2017-06-21 09:51:56 -0400
committerjim-p <jimp@pfsense.org>2017-06-21 09:51:56 -0400
commitf4f220a796c0e529bd99f969b9f204d37ad79a97 (patch)
tree535c4aaa85c5764fbe60f311d5d32fb00aef9c8a
parent317d00df00ae0e8e1c42de2bcdef2348ac2b9f34 (diff)
downloadpfsense-f4f220a796c0e529bd99f969b9f204d37ad79a97.zip
pfsense-f4f220a796c0e529bd99f969b9f204d37ad79a97.tar.gz
Use is_numeric() to make sure $prefix is not 0
-rw-r--r--src/etc/inc/openvpn.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/etc/inc/openvpn.inc b/src/etc/inc/openvpn.inc
index ff3ab16..17b1c02 100644
--- a/src/etc/inc/openvpn.inc
+++ b/src/etc/inc/openvpn.inc
@@ -1815,7 +1815,7 @@ function openvpn_gen_route_ipv4($network, $iroute = false) {
function openvpn_gen_route_ipv6($network, $iroute = false) {
$i = ($iroute) ? "i" : "";
list($ipv6, $prefix) = explode('/', trim($network));
- if (empty($prefix)) {
+ if (empty($prefix) && !is_numeric($prefix)) {
$prefix = "128";
}
return "{$i}route-ipv6 ${ipv6}/${prefix}";
OpenPOWER on IntegriCloud