summaryrefslogtreecommitdiffstats
path: root/usr/local/www
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-05-24 13:26:02 -0400
committerjim-p <jimp@pfsense.org>2010-05-24 13:26:02 -0400
commit08a5d2eb844f98e3ff1fa59dc28a7f9134b08306 (patch)
tree17ea909440738393e52da36620024842c4637311 /usr/local/www
parentcd12fce3a6ea6dab37d35fa78c5faded0f704b9c (diff)
downloadpfsense-08a5d2eb844f98e3ff1fa59dc28a7f9134b08306.zip
pfsense-08a5d2eb844f98e3ff1fa59dc28a7f9134b08306.tar.gz
Properly generate a list of proxy arp VIPs for address drop-down list.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-xusr/local/www/firewall_nat_edit.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php
index d7806b1..719e32f 100755
--- a/usr/local/www/firewall_nat_edit.php
+++ b/usr/local/www/firewall_nat_edit.php
@@ -625,13 +625,13 @@ include("fbegin.inc"); ?>
<?php if (is_array($config['virtualip']['vip'])):
foreach ($config['virtualip']['vip'] as $sn):
if ($sn['mode'] == "proxyarp" && $sn['type'] == "network"):
- $baseip = ip2long32($sn['subnet']) & ip2long(gen_subnet_mask($sn['subnet_bits']));
-
- for ($i = $sn['subnet_bits'] - 1; $i <= 32; $i++):
- $snip = long2ip32($baseip);
+ $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);
?>
<option value="<?=$snip;?>" <?php if ($snip == $pconfig['dst']) echo "selected"; ?>><?=htmlspecialchars("{$snip} ({$sn['descr']})");?></option>
- <?php $baseip = $baseip + 1; ?>
<?php endfor;
else:
?>
OpenPOWER on IntegriCloud