summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_ipsec_phase2.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-02-12 16:33:01 +0000
committerErmal Luçi <eri@pfsense.org>2010-02-12 16:33:01 +0000
commit184d50b5646e7aeaca6d754e588c3e93ebf4c9f7 (patch)
tree1b5864fda85da2dafc3cf3e89cd1106fbf20bc08 /usr/local/www/vpn_ipsec_phase2.php
parentb1b86db7a522615f7971ee7028316cd66b84da05 (diff)
downloadpfsense-184d50b5646e7aeaca6d754e588c3e93ebf4c9f7.zip
pfsense-184d50b5646e7aeaca6d754e588c3e93ebf4c9f7.tar.gz
Ticket #352. Allow 0 mask in remote network bits.
Diffstat (limited to 'usr/local/www/vpn_ipsec_phase2.php')
-rw-r--r--usr/local/www/vpn_ipsec_phase2.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/usr/local/www/vpn_ipsec_phase2.php b/usr/local/www/vpn_ipsec_phase2.php
index b08cb3f..f2899e6 100644
--- a/usr/local/www/vpn_ipsec_phase2.php
+++ b/usr/local/www/vpn_ipsec_phase2.php
@@ -122,7 +122,7 @@ if ($_POST) {
{
switch ($pconfig['localid_type']) {
case "network":
- if (!$pconfig['localid_netbits'] || !is_numeric($pconfig['localid_netbits']))
+ if (($pconfig['localid_netbits'] != 0 && !$pconfig['localid_netbits']) || !is_numeric($pconfig['localid_netbits']))
$input_errors[] = "A valid local network bit count must be specified.";
case "address":
if (!$pconfig['localid_address'] || !is_ipaddr($pconfig['localid_address']))
@@ -132,7 +132,7 @@ if ($_POST) {
switch ($pconfig['remoteid_type']) {
case "network":
- if (!$pconfig['remoteid_netbits'] || !is_numeric($pconfig['remoteid_netbits']))
+ if (($pconfig['remoteid_netbits'] != 0 && !$pconfig['remoteid_netbits']) || !is_numeric($pconfig['remoteid_netbits']))
$input_errors[] = "A valid remote network bit count must be specified.";
case "address":
if (!$pconfig['remoteid_address'] || !is_ipaddr($pconfig['remoteid_address']))
@@ -401,11 +401,12 @@ function change_protocol() {
<input name="remoteid_address" type="text" class="formfld unknown" id="remoteid_address" size="20" value="<?=$pconfig['remoteid_address'];?>">
/
<select name="remoteid_netbits" class="formselect" id="remoteid_netbits">
- <?php for ($i = 32; $i >= 0; $i--): ?>
- <option value="<?=$i;?>" <?php if ($i == $pconfig['remoteid_netbits']) echo "selected"; ?>>
- <?=$i;?>
- </option>
- <?php endfor; ?>
+ <?php for ($i = 32; $i >= 0; $i--) {
+
+ echo "<option value=\"{$i}\"";
+ if ($i == $pconfig['remoteid_netbits']) echo " selected";
+ echo ">{$i}</option>\n";
+ } ?>
</select>
</td>
</tr>
OpenPOWER on IntegriCloud