diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-03-09 21:18:25 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-03-09 21:18:25 +0000 |
commit | c92048962943869840b7ffb3382efa88a0dc0b18 (patch) | |
tree | 5bcbda8b6ea621e29d10eea8c5163647c32d90ed /usr/local | |
parent | c0f5182ce0b30aa61b02df3dbe3d45fcda0961db (diff) | |
download | pfsense-c92048962943869840b7ffb3382efa88a0dc0b18.zip pfsense-c92048962943869840b7ffb3382efa88a0dc0b18.tar.gz |
Ticket #386. Add all possible proxy arp to the external ip when it is defined as network.
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/firewall_nat_edit.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php index 6481cd2..932b02e 100755 --- a/usr/local/www/firewall_nat_edit.php +++ b/usr/local/www/firewall_nat_edit.php @@ -349,8 +349,18 @@ include("fbegin.inc"); ?> <select name="extaddr" class="formselect"> <option value="" <?php if (!$pconfig['extaddr']) 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['extaddr']) echo "selected"; ?>><?=htmlspecialchars("{$snip} ({$sn['descr']})");?></option> + <?php endfor; + else: ?> <option value="<?=$sn['subnet'];?>" <?php if ($sn['subnet'] == $pconfig['extaddr']) echo "selected"; ?>><?=htmlspecialchars("{$sn['subnet']} ({$sn['descr']})");?></option> + <?php endif; ?> <?php endforeach; endif; ?> <option value="any" <?php if($pconfig['extaddr'] == "any") echo "selected"; ?>>any</option> |