summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_nat_1to1_edit.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2016-12-02 12:14:27 -0500
committerjim-p <jimp@pfsense.org>2016-12-02 12:15:05 -0500
commit80bc583c2365a0df606f409f6526385b1f0d8023 (patch)
tree717d6b39ea67ec6b0a16bb8e79f54303062c4f09 /src/usr/local/www/firewall_nat_1to1_edit.php
parentd2ce7d30c3a6af60a79e6d43a847ab2237ad9cd6 (diff)
downloadpfsense-80bc583c2365a0df606f409f6526385b1f0d8023.zip
pfsense-80bc583c2365a0df606f409f6526385b1f0d8023.tar.gz
Standardize and fix 'other' type VIP display on NAT pages. Fixes #6094
Diffstat (limited to 'src/usr/local/www/firewall_nat_1to1_edit.php')
-rw-r--r--src/usr/local/www/firewall_nat_1to1_edit.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/usr/local/www/firewall_nat_1to1_edit.php b/src/usr/local/www/firewall_nat_1to1_edit.php
index a191a60..4d7ebe9 100644
--- a/src/usr/local/www/firewall_nat_1to1_edit.php
+++ b/src/usr/local/www/firewall_nat_1to1_edit.php
@@ -312,21 +312,20 @@ function build_dsttype_list() {
if (is_array($config['virtualip']['vip'])) {
foreach ($config['virtualip']['vip'] as $sn) {
- if (isset($sn['noexpand'])) {
- continue;
- }
-
- if ($sn['mode'] == "proxyarp" && $sn['type'] == "network") {
+ if (($sn['mode'] == "proxyarp" || $sn['mode'] == "other") && $sn['type'] == "network") {
+ $list[$sn['subnet'] . '/' . $sn['subnet_bits']] = 'Subnet: ' . $sn['subnet'] . '/' . $sn['subnet_bits'] . ' (' . $sn['descr'] . ')';
+ if (isset($sn['noexpand'])) {
+ continue;
+ }
$start = ip2long32(gen_subnet($sn['subnet'], $sn['subnet_bits']));
$end = ip2long32(gen_subnet_max($sn['subnet'], $sn['subnet_bits']));
$len = $end - $start;
-
for ($i = 0; $i <= $len; $i++) {
$snip = long2ip32($start+$i);
$list[$snip] = $snip . ' (' . $sn['descr'] . ')';
}
-
+ } else {
$list[$sn['subnet']] = $sn['subnet'] . ' (' . $sn['descr'] . ')';
}
}
OpenPOWER on IntegriCloud