summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces_wan.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-01-08 05:07:48 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-01-08 05:07:48 +0000
commit21ab1cde16f65e515225bf2dfae9287e0c29c939 (patch)
tree050a767e7a2f3844544de268cf4231dfba99aae2 /usr/local/www/interfaces_wan.php
parentab73789e0cff744979c1703259098e6f89285a14 (diff)
downloadpfsense-21ab1cde16f65e515225bf2dfae9287e0c29c939.zip
pfsense-21ab1cde16f65e515225bf2dfae9287e0c29c939.tar.gz
remove /31 from interface IP assignment screens since a /31 subnet has 0 usable IP addresses. simpify all 1-32 loops by using the same code as much as possible.
Diffstat (limited to 'usr/local/www/interfaces_wan.php')
-rwxr-xr-xusr/local/www/interfaces_wan.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr/local/www/interfaces_wan.php b/usr/local/www/interfaces_wan.php
index fb08f17..7e8e174 100755
--- a/usr/local/www/interfaces_wan.php
+++ b/usr/local/www/interfaces_wan.php
@@ -461,16 +461,28 @@ function type_change(enable_change,enable_change_pptp) {
<td class="vtable"> <input name="ipaddr" type="text" class="formfld" id="ipaddr" size="20" value="<?=htmlspecialchars($pconfig['ipaddr']);?>">
/
<select name="subnet" class="formfld" id="subnet">
+ <?php
+ for ($i = 32; $i > 0; $i--) {
+ if($i <> 31) {
+ echo "<option value=\"{$i}\" ";
+ if ($i == $pconfig['subnet']) echo "selected";
+ echo ">" . $i . "</option>";
+ }
+ }
+ ?>
<?php
+ /*
if (isset($wancfg['ispointtopoint']))
$snmax = 32;
else
$snmax = 31;
for ($i = $snmax; $i > 0; $i--): ?>
- <option value="<?=$i;?>" <?php if ($i == $pconfig['subnet']) echo "selected"; ?>>
+ <?php if(i$ <> 31) ?><option value="<?=$i;?>" <?php if ($i == $pconfig['subnet']) echo "selected"; ?>><?php end if; ?>
<?=$i;?>
</option>
<?php endfor; ?>
+ */
+ ?>
</select></td>
</tr><?php if (isset($wancfg['ispointtopoint'])): ?>
<tr>
OpenPOWER on IntegriCloud