From c8cc0c1c5adc7c83a1d7e8c1e293d43baf74fdc0 Mon Sep 17 00:00:00 2001 From: smos Date: Wed, 13 Apr 2011 09:47:06 +0200 Subject: Add missing fields for l2tp to define dns and wins servers --- usr/local/www/vpn_l2tp.php | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'usr') diff --git a/usr/local/www/vpn_l2tp.php b/usr/local/www/vpn_l2tp.php index 3cb6e4e..37eac0f 100644 --- a/usr/local/www/vpn_l2tp.php +++ b/usr/local/www/vpn_l2tp.php @@ -50,6 +50,9 @@ $pconfig['localip'] = $l2tpcfg['localip']; $pconfig['l2tp_subnet'] = $l2tpcfg['l2tp_subnet']; $pconfig['mode'] = $l2tpcfg['mode']; $pconfig['interface'] = $l2tpcfg['interface']; +$pconfig['l2tp_dns1'] = $l2tpcfg['dns1']; +$pconfig['l2tp_dns2'] = $l2tpcfg['dns2']; +$pconfig['wins'] = $l2tpcfg['wins']; $pconfig['radiusenable'] = isset($l2tpcfg['radius']['enable']); $pconfig['radacct_enable'] = isset($l2tpcfg['radius']['accounting']); $pconfig['radiusserver'] = $l2tpcfg['radius']['server']; @@ -126,8 +129,26 @@ if ($_POST) { $l2tpcfg['radius']['secret'] = $_POST['radiussecret']; $l2tpcfg['secret'] = $_POST['secret']; + if($_POST['wins']) + $l2tpcfg['wins'] = $_POST['wins']; + else + unset($l2tpcfg['wins']); + $l2tpcfg['paporchap'] = $_POST['paporchap']; + + if ($_POST['l2tp_dns1'] == "") { + if (isset($l2tpcfg['dns1'])) + unset($l2tpcfg['dns1']); + } else + $l2tpcfg['dns1'] = $_POST['l2tp_dns1']; + + if ($_POST['l2tp_dns2'] == "") { + if (isset($l2tpcfg['dns2'])) + unset($l2tpcfg['dns2']); + } else + $l2tpcfg['dns2'] = $_POST['l2tp_dns2']; + if($_POST['radiusenable'] == "yes") $l2tpcfg['radius']['enable'] = true; else @@ -183,6 +204,8 @@ function enable_change(enable_over) { document.iform.interface.disabled = 0; document.iform.n_l2tp_units.disabled = 0; document.iform.secret.disabled = 0; + document.iform.l2tp_dns1.disabled = 0; + document.iform.l2tp_dns2.disabled = 0; /* fix colors */ document.iform.remoteip.style.backgroundColor = '#FFFFFF'; document.iform.localip.style.backgroundColor = '#FFFFFF'; @@ -218,6 +241,8 @@ function enable_change(enable_over) { document.iform.interface.disabled = 1; document.iform.n_l2tp_units.disabled = 1; document.iform.l2tp_subnet.disabled = 1; + document.iform.l2tp_dns1.disabled = 1; + document.iform.l2tp_dns2.disabled = 1; document.iform.paporchap.disabled = 1; document.iform.remoteip.disabled = 1; document.iform.localip.disabled = 1; @@ -360,6 +385,22 @@ function enable_change(enable_over) {
+ + + + +
+ +
+
+ + + + + + + + -- cgit v1.1