Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
2cb7662e
Commit
2cb7662e
authored
Feb 19, 2016
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plugins: clean up a bit, add temporary laucher for functions
(cherry picked from commit
93e47fac
)
parent
73df7592
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
32 deletions
+29
-32
plugins.inc
src/etc/inc/plugins.inc
+8
-0
vpn.inc
src/etc/inc/plugins.inc.d/vpn.inc
+10
-19
rc.bootup
src/etc/rc.bootup
+8
-2
vpn_pptp.php
src/www/vpn_pptp.php
+1
-4
vpn_pptp_users.php
src/www/vpn_pptp_users.php
+2
-7
No files found.
src/etc/inc/plugins.inc
View file @
2cb7662e
...
...
@@ -29,3 +29,11 @@
foreach
(
glob
(
'/usr/local/etc/inc/plugins.inc.d/*.inc'
)
as
$plugin
)
{
require_once
$plugin
;
}
/* XXX must be reworked to work dynamically, not by name */
function
plugins_hook_xxx
(
$name
)
{
if
(
function_exists
(
$name
))
{
return
$name
();
}
}
src/etc/inc/plugins.inc.d/vpn.inc
View file @
2cb7662e
...
...
@@ -29,18 +29,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
function
vpn_setup
()
{
/* start pptpd */
vpn_pptpd_configure
();
/* start pppoe server */
vpn_pppoes_configure
();
/* setup l2tp */
vpn_l2tp_configure
();
}
function
vpn_netgraph_support
()
{
$iflist
=
get_configured_interface_list
();
foreach
(
$iflist
as
$iface
)
{
...
...
@@ -275,16 +263,19 @@ EOD;
return
0
;
}
function
vpn_pppoes_configure
()
{
function
vpn_pppoes_configure
()
{
global
$config
;
if
(
isset
(
$config
[
'pppoes'
][
'pppoe'
])
&&
is_array
(
$config
[
'pppoes'
][
'pppoe'
]))
{
foreach
(
$config
[
'pppoes'
][
'pppoe'
]
as
$pppoe
)
if
(
isset
(
$config
[
'pppoes'
][
'pppoe'
]))
{
foreach
(
$config
[
'pppoes'
][
'pppoe'
]
as
$pppoe
)
{
vpn_pppoe_configure
(
$pppoe
);
}
}
}
function
vpn_pppoe_configure
(
&
$pppoecfg
)
{
function
vpn_pppoe_configure
(
&
$pppoecfg
)
{
global
$config
;
$syscfg
=
$config
[
'system'
];
...
...
src/etc/rc.bootup
View file @
2cb7662e
...
...
@@ -315,8 +315,14 @@ configd_run("dyndns reload");
/* Run a filter configure now that most all services have started */
filter_configure_sync
();
/* setup pppoe and pptp */
vpn_setup
();
/* start pptpd */
plugins_hook_xxx
(
'vpn_pptpd_configure'
);
/* start pppoe server */
plugins_hook_xxx
(
'vpn_pppoes_configure'
);
/* setup l2tp */
plugins_hook_xxx
(
'vpn_l2tp_configure'
);
/* start IPsec tunnels */
$ipsec_dynamic_hosts
=
ipsec_configure
();
...
...
src/www/vpn_pptp.php
View file @
2cb7662e
...
...
@@ -187,11 +187,8 @@ if ($_POST) {
}
write_config
();
$retval
=
0
;
$retval
=
vpn_pptpd_configure
();
$savemsg
=
get_std_save_message
();
vpn_pptpd_configure
();
filter_configure
();
}
}
...
...
src/www/vpn_pptp_users.php
View file @
2cb7662e
...
...
@@ -39,15 +39,10 @@ if ($_POST) {
$pconfig
=
$_POST
;
if
(
$_POST
[
'apply'
])
{
$retval
=
0
;
$retval
=
vpn_setup
();
vpn_pptpd_configure
();
$savemsg
=
get_std_save_message
();
if
(
$retval
==
0
)
{
if
(
is_subsystem_dirty
(
'pptpusers'
))
{
clear_subsystem_dirty
(
'pptpusers'
);
}
}
}
}
if
(
$_GET
[
'act'
]
==
"del"
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment