diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-01-08 05:07:48 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-01-08 05:07:48 +0000 |
commit | 21ab1cde16f65e515225bf2dfae9287e0c29c939 (patch) | |
tree | 050a767e7a2f3844544de268cf4231dfba99aae2 /usr/local/www/interfaces_lan.php | |
parent | ab73789e0cff744979c1703259098e6f89285a14 (diff) | |
download | pfsense-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_lan.php')
-rwxr-xr-x | usr/local/www/interfaces_lan.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/usr/local/www/interfaces_lan.php b/usr/local/www/interfaces_lan.php index e15fa3d..cb38e46 100755 --- a/usr/local/www/interfaces_lan.php +++ b/usr/local/www/interfaces_lan.php @@ -143,11 +143,15 @@ function ipaddr_change() { <input name="ipaddr" type="text" class="formfld" id="hostname" size="20" value="<?=htmlspecialchars($pconfig['ipaddr']);?>" onchange="ipaddr_change()"> / <select name="subnet" class="formfld" id="subnet"> - <?php for ($i = 32; $i > 0; $i--): ?> - <option value="<?=$i;?>" <?php if ($i == $pconfig['subnet']) echo "selected"; ?>> - <?=$i;?> - </option> - <?php endfor; ?> + <?php + for ($i = 32; $i > 0; $i--) { + if($i <> 31) { + echo "<option value=\"{$i}\" "; + if ($i == $pconfig['subnet']) echo "selected"; + echo ">" . $i . "</option>"; + } + } + ?> </select></td> </tr> <?php /* Wireless interface? */ |