mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Ticket #854 fixes
* Compute the correct amount of ng interface for pptp and pppoe * Restart mpd processes in one function so that duplicates do not end up in mpd.conf file
This commit is contained in:
parent
7a3a352aff
commit
88964924ef
@ -235,8 +235,22 @@ function filter_generate_aliases() {
|
||||
$aliases .= "# System Aliases \n";
|
||||
$aliases .= "lan = \"{ {$config['interfaces']['lan']['if']}{$lan_aliases} }\"\n";
|
||||
$aliases .= "wan = \"{ " . get_real_wan_interface() . "{$wan_aliases} }\"\n";
|
||||
$aliases .= "pptp = \"{ ng1 ng2 ng3 ng4 ng5 ng6 ng7 ng8 ng9 ng10 ng11 ng12 ng13 ng14 }\"\n";
|
||||
$aliases .= "pppoe = \"{ ng1 ng2 ng3 ng4 ng5 ng6 ng7 ng8 ng9 ng10 ng11 ng12 ng13 ng14 }\"\n";
|
||||
|
||||
/* build pptp alias */
|
||||
$aliases .= "pptp = \"{ ";
|
||||
for($x=0; $x<$g["n_pptp_units"]; $x++) {
|
||||
$aliases .= "ng{$x} ";
|
||||
}
|
||||
$counter = $x;
|
||||
$aliases .= "}\" \n";
|
||||
|
||||
/* build pppoe alias */
|
||||
$aliases .= "pppoe = \"{ ";
|
||||
for($x=0; $x<$g["n_pppoe_units"]; $x++) {
|
||||
$counter++;
|
||||
$aliases .= "ng{$counter} ";
|
||||
}
|
||||
$aliases .= "}\" \n";
|
||||
|
||||
$ifdescrs = array();
|
||||
for ($j = 1; isset($config['interfaces']['opt' . $j]); $j++) {
|
||||
|
||||
@ -33,6 +33,15 @@
|
||||
/* include all configuration functions */
|
||||
require_once("functions.inc");
|
||||
|
||||
/* master setup for vpn (mpd) */
|
||||
function vpn_setup() {
|
||||
/* start pptpd */
|
||||
vpn_pptpd_configure();
|
||||
|
||||
/* start pppoe server */
|
||||
vpn_pppoe_configure();
|
||||
}
|
||||
|
||||
function vpn_ipsec_failover_configure() {
|
||||
global $config, $g;
|
||||
|
||||
@ -836,14 +845,6 @@ function vpn_pppoe_configure() {
|
||||
return 0;
|
||||
|
||||
echo "Configuring PPPoE VPN service... ";
|
||||
} else {
|
||||
/* kill mpd */
|
||||
killbypid("{$g['varrun_path']}/mpd-vpn.pid");
|
||||
|
||||
/* wait for process to die */
|
||||
sleep(2);
|
||||
|
||||
vpn_pptpd_configure();
|
||||
}
|
||||
|
||||
/* make sure mpd-vpn directory exists */
|
||||
|
||||
@ -220,11 +220,8 @@
|
||||
/* start the NTP client */
|
||||
system_ntp_configure();
|
||||
|
||||
/* start pptpd */
|
||||
vpn_pptpd_configure();
|
||||
|
||||
/* start pppoe server */
|
||||
vpn_pppoe_configure();
|
||||
/* setup pppoe and pptp */
|
||||
vpn_setup();
|
||||
|
||||
/* start the captive portal */
|
||||
captiveportal_configure();
|
||||
|
||||
@ -119,7 +119,7 @@ if ($_POST) {
|
||||
$retval = 0;
|
||||
|
||||
config_lock();
|
||||
$retval = vpn_pppoe_configure();
|
||||
$retval = vpn_setup();
|
||||
config_unlock();
|
||||
|
||||
$savemsg = get_std_save_message($retval);
|
||||
|
||||
@ -44,7 +44,7 @@ if ($_POST) {
|
||||
$retval = 0;
|
||||
|
||||
config_lock();
|
||||
$retval = vpn_pppoe_configure();
|
||||
$retval = vpn_setup();
|
||||
config_unlock();
|
||||
|
||||
$savemsg = get_std_save_message($retval);
|
||||
|
||||
@ -103,7 +103,7 @@ if ($_POST) {
|
||||
write_config();
|
||||
|
||||
config_lock();
|
||||
$retval = vpn_pppoe_configure();
|
||||
$retval = vpn_setup();
|
||||
config_unlock();
|
||||
|
||||
header("Location: vpn_pppoe_users.php");
|
||||
|
||||
@ -127,7 +127,7 @@ if ($_POST) {
|
||||
$retval = 0;
|
||||
|
||||
config_lock();
|
||||
$retval = vpn_pptpd_configure();
|
||||
$retval = vpn_setup();
|
||||
config_unlock();
|
||||
|
||||
$savemsg = get_std_save_message($retval);
|
||||
|
||||
@ -43,7 +43,7 @@ if ($_POST) {
|
||||
if ($_POST['apply']) {
|
||||
$retval = 0;
|
||||
config_lock();
|
||||
$retval = vpn_pptpd_configure();
|
||||
$retval = vpn_setup();
|
||||
config_unlock();
|
||||
$savemsg = get_std_save_message($retval);
|
||||
if ($retval == 0) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user