summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Smith <mgsmith@netgate.com>2015-10-14 10:14:38 -0500
committerMatt Smith <mgsmith@netgate.com>2015-10-14 10:14:38 -0500
commit92c576796a2b2cc0d3100407b8eed9b95a8da446 (patch)
tree8def72e1f6653a16bf29a297203c2b51900d2428
parentd3ff1e596e522514af7b962bfc18af700e1449f7 (diff)
parent3fac0afc0fa02e5d36e607236740638ae3acf044 (diff)
downloadpfsense-92c576796a2b2cc0d3100407b8eed9b95a8da446.zip
pfsense-92c576796a2b2cc0d3100407b8eed9b95a8da446.tar.gz
Merge pull request #1689 from jlduran/l2tp-mschapv2
-rw-r--r--src/etc/inc/vpn.inc14
-rw-r--r--src/usr/local/www/vpn_l2tp.php21
2 files changed, 21 insertions, 14 deletions
diff --git a/src/etc/inc/vpn.inc b/src/etc/inc/vpn.inc
index 220da2b..a529cfa 100644
--- a/src/etc/inc/vpn.inc
+++ b/src/etc/inc/vpn.inc
@@ -1686,10 +1686,16 @@ function vpn_l2tp_configure() {
$l2tp_listen="set l2tp self $ipaddr";
}
- if ($l2tpcfg['paporchap'] == "chap") {
- $paporchap = "set link enable chap";
- } else {
- $paporchap = "set link enable pap";
+ switch ($l2tpcfg['paporchap']) {
+ case 'chap':
+ $paporchap = "set link enable chap";
+ break;
+ case 'chap-msv2':
+ $paporchap = "set link enable chap-msv2";
+ break;
+ default:
+ $paporchap = "set link enable pap";
+ break;
}
/* write mpd.conf */
diff --git a/src/usr/local/www/vpn_l2tp.php b/src/usr/local/www/vpn_l2tp.php
index 24b23fe..145d361 100644
--- a/src/usr/local/www/vpn_l2tp.php
+++ b/src/usr/local/www/vpn_l2tp.php
@@ -364,13 +364,13 @@ foreach ($interfaces as $iface => $ifacename): ?>
<div class="col-sm-2">
<select id="l2tp_subnet" name="l2tp_subnet" class="form-control">
<?php
- for($x=0; $x<33; $x++) {
+ for($x=0; $x<33; $x++) {
if($x == $pconfig['l2tp_subnet'])
$SELECTED = " selected=\"selected\"";
else
$SELECTED = "";
echo "<option value=\"{$x}\"{$SELECTED}>{$x}</option>\n";
- }
+ }
?>
</select>
<span class="help-block">
@@ -384,13 +384,13 @@ foreach ($interfaces as $iface => $ifacename): ?>
<div class="col-sm-2">
<select id="n_l2tp_units" name="n_l2tp_units" class="form-control">
<?php
- for($x=0; $x<255; $x++) {
+ for($x=0; $x<255; $x++) {
if($x == $pconfig['n_l2tp_units'])
$SELECTED = " selected=\"selected\"";
else
$SELECTED = "";
echo "<option value=\"{$x}\"{$SELECTED}>{$x}</option>\n";
- }
+ }
?>
</select>
<span class="help-block">
@@ -414,6 +414,7 @@ foreach ($interfaces as $iface => $ifacename): ?>
<div class="col-sm-2">
<?=$mandfldhtml?><select name="paporchap" id="paporchap" class="form-control">
<option value='chap'<?php if($pconfig['paporchap'] == "chap") echo " selected=\"selected\""?>><?=gettext("CHAP")?></option>
+ <option value='chap-msv2'<?php if ($pconfig['paporchap'] == "chap-msv2") echo " selected=\"selected\""?>><?=gettext("MS-CHAPv2")?></option>
<option value='pap'<?php if($pconfig['paporchap'] == "pap") echo " selected=\"selected\""?>><?=gettext("PAP")?></option>
</select>
<span class="help-block">
@@ -426,18 +427,18 @@ foreach ($interfaces as $iface => $ifacename): ?>
<label for="l2tp_dns1" class="col-sm-2 control-label"><?=gettext("L2TP DNS Servers")?></label>
<div class="col-sm-10">
<?=$mandfldhtml?><input name="l2tp_dns1" type="text" class="formfld unknown form-control" id="l2tp_dns1" size="20" value="<?=htmlspecialchars($pconfig['l2tp_dns1'])?>" />
- <input name="l2tp_dns2" type="text" class="formfld unknown form-control" id="l2tp_dns2" size="20" value="<?=htmlspecialchars($pconfig['l2tp_dns2'])?>" />
+ <input name="l2tp_dns2" type="text" class="formfld unknown form-control" id="l2tp_dns2" size="20" value="<?=htmlspecialchars($pconfig['l2tp_dns2'])?>" />
<span class="help-block">
- <?=gettext("primary and secondary DNS servers assigned to L2TP clients")?>
+ <?=gettext("primary and secondary DNS servers assigned to L2TP clients")?>
</span>
- </div>
+ </div>
</div>
<div class="form-group">
<label for="wins" class="col-sm-2 control-label"><?=gettext("WINS Server")?></label>
<div class="col-sm-10">
<input name="wins" class="formfld unknown form-control" id="wins" size="20" value="<?=htmlspecialchars($pconfig['wins'])?>" />
- </div>
+ </div>
</div>
</div>
</div>
@@ -456,7 +457,7 @@ foreach ($interfaces as $iface => $ifacename): ?>
<?=gettext("Use a RADIUS server for authentication")?>
</label>
<span class="help-block">
- <?=gettext("When set, all users will be authenticated using the RADIUS server specified below. The local user database will not be used.")?>
+ <?=gettext("When set, all users will be authenticated using the RADIUS server specified below. The local user database will not be used.")?>
</span>
</div>
</div>
@@ -522,4 +523,4 @@ foreach ($interfaces as $iface => $ifacename): ?>
//]]>
</script>
-<?php include("foot.inc")?> \ No newline at end of file
+<?php include("foot.inc")?>
OpenPOWER on IntegriCloud