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
efe54e55
Commit
efe54e55
authored
Jul 06, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter: no hay flowtable; code asks for FreeBSD 8...
parent
3b300e16
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
40 deletions
+0
-40
filter.inc
src/etc/inc/filter.inc
+0
-30
system_advanced_network.php
src/www/system_advanced_network.php
+0
-10
No files found.
src/etc/inc/filter.inc
View file @
efe54e55
...
...
@@ -73,33 +73,6 @@ function is_bogonsv6_used() {
return
$usebogonsv6
;
}
function
flowtable_configure
()
{
global
$config
,
$g
;
if
(
empty
(
$config
[
'system'
][
'flowtable'
]))
{
set_single_sysctl
(
"net.inet.flowtable.enable"
,
"0"
);
return
;
}
// Figure out how many flows we should reserve
// sized 2x larger than the number of unique connection destinations.
if
(
$config
[
'system'
][
'maximumstates'
]
<>
""
&&
is_numeric
(
$config
[
'system'
][
'maximumstates'
]))
$maxstates
=
$config
[
'system'
][
'maximumstates'
];
else
$maxstates
=
150000
;
// nmbflows cpu count * ($maxstates * 2)
$cpus
=
get_single_sysctl
(
'kern.smp.cpus'
);
$nmbflows
=
(
$cpus
*
(
$maxstates
*
2
));
// Flowtable currently only works on 8.0
if
(
get_freebsd_version
()
==
"8"
)
{
set_sysctl
(
array
(
"net.inet.flowtable.nmbflows"
=>
$nmbflows
,
"net.inet.ip.output_flowtable_size"
=>
$maxstates
,
"net.inet.flowtable.enable"
=>
"1"
)
);
}
}
function
filter_pflog_start
()
{
if
(
isvalidpid
(
'/var/run/filterlog.pid'
))
{
...
...
@@ -240,9 +213,6 @@ function filter_configure_sync($delete_states_if_needed = true)
if
(
isset
(
$config
[
'system'
][
'lb_use_sticky'
])
&&
is_numeric
(
$config
[
'system'
][
'srctrack'
])
&&
(
$config
[
'system'
][
'srctrack'
]
>
0
))
$limitrules
.=
"set timeout src.track
{
$config
[
'system'
][
'srctrack'
]
}
\n
"
;
// Configure flowtable support if enabled.
flowtable_configure
();
$rules
=
""
;
$rules
=
"
{
$limitrules
}
\n
"
;
$rules
.=
"
{
$aliases
}
\n
"
;
...
...
src/www/system_advanced_network.php
View file @
efe54e55
...
...
@@ -42,7 +42,6 @@ $pconfig['sharednet'] = $config['system']['sharednet'];
$pconfig
[
'disablechecksumoffloading'
]
=
isset
(
$config
[
'system'
][
'disablechecksumoffloading'
]);
$pconfig
[
'disablesegmentationoffloading'
]
=
isset
(
$config
[
'system'
][
'disablesegmentationoffloading'
]);
$pconfig
[
'disablelargereceiveoffloading'
]
=
isset
(
$config
[
'system'
][
'disablelargereceiveoffloading'
]);
$pconfig
[
'flowtable'
]
=
isset
(
$config
[
'system'
][
'flowtable'
]);
if
(
$_POST
)
{
unset
(
$input_errors
);
...
...
@@ -95,12 +94,6 @@ if ($_POST) {
setup_polling
();
}
if
(
$_POST
[
'flowtable'
]
==
"yes"
)
{
$config
[
'system'
][
'flowtable'
]
=
$_POST
[
'flowtable'
];
}
else
{
unset
(
$config
[
'system'
][
'flowtable'
]);
}
if
(
$_POST
[
'disablechecksumoffloading'
]
==
"yes"
)
{
$config
[
'system'
][
'disablechecksumoffloading'
]
=
true
;
}
else
{
...
...
@@ -124,9 +117,6 @@ if ($_POST) {
// Write out configuration (config.xml)
write_config
();
// Configure flowtable support from filter.inc
flowtable_configure
();
// Set preferred protocol
prefer_ipv4_or_ipv6
();
...
...
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