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_opt.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_opt.php')
-rwxr-xr-x | usr/local/www/interfaces_opt.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/usr/local/www/interfaces_opt.php b/usr/local/www/interfaces_opt.php index c2f4226..4b80cc4 100755 --- a/usr/local/www/interfaces_opt.php +++ b/usr/local/www/interfaces_opt.php @@ -243,10 +243,15 @@ function ipaddr_change() { <input name="ipaddr" type="text" class="formfld" id="ipaddr" 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; ?> - </select> + <?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? */ |