summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_nat_out_edit.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-09 23:56:56 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-09 23:56:56 +0000
commit1c38875e1e4ad52c3e10a5700f23ad2dcf6d398c (patch)
tree86030c13c980da9441bb15356a588dd51c0c30d0 /usr/local/www/firewall_nat_out_edit.php
parentd3ab36dc38ceb62446f445cfb1c5b704e1174aa0 (diff)
downloadpfsense-1c38875e1e4ad52c3e10a5700f23ad2dcf6d398c.zip
pfsense-1c38875e1e4ad52c3e10a5700f23ad2dcf6d398c.tar.gz
Ticket #386. Add all possible proxy arp to the external ip when it is defined as network even on outbound NAT.
Diffstat (limited to 'usr/local/www/firewall_nat_out_edit.php')
-rwxr-xr-xusr/local/www/firewall_nat_out_edit.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php
index 31e8a0c..1706a95 100755
--- a/usr/local/www/firewall_nat_out_edit.php
+++ b/usr/local/www/firewall_nat_out_edit.php
@@ -431,9 +431,18 @@ any)</td>
<td><select name="target" class="formselect">
<option value=""<?php if (!$pconfig['target']) echo " selected"; ?>>Interface address</option>
<?php if (is_array($config['virtualip']['vip'])):
- foreach ($config['virtualip']['vip'] as $sn): ?>
+ foreach ($config['virtualip']['vip'] as $sn):
+ if ($sn['mode'] == "proxyarp" && $sn['type'] == "network"):
+ $baseip = ip2long($sn['subnet']) & ip2long(gen_subnet_mask($sn['subnet_bits']));
+ for ($i = $sn['subnet_bits']; $i <= 32; $i++):
+ $baseip = $baseip + 1;
+ $snip = long2ip($baseip);
+?>
+ <option value="<?=$snip;?>" <?php if ($snip == $pconfig['target']) echo "selected"; ?>><?=htmlspecialchars("{$snip} ({$sn['descr']})");?></option>
+ <?php endfor; ?>
+ <?php else: ?>
<option value="<?=$sn['subnet'];?>" <?php if ($sn['subnet'] == $pconfig['target']) echo "selected"; ?>><?=htmlspecialchars("{$sn['subnet']} ({$sn['descr']})");?></option>
-<?php endforeach;
+<?php endif; endforeach;
endif;
?>
<option value=""<?php if($pconfig['target'] == "any") echo " selected"; ?>>any</option>
OpenPOWER on IntegriCloud