summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 7585c59..3c029c5 100644
--- a/src/etc/inc/vpn.inc
+++ b/src/etc/inc/vpn.inc
@@ -1660,10 +1660,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