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
1a3cd61d
Commit
1a3cd61d
authored
Jun 11, 2017
by
Ad Schellevis
Committed by
Franco Fichtner
Jun 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move skip_rules_gw_down feature to rule processing
parent
b4553f04
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
FilterRule.php
...opnsense/mvc/app/library/OPNsense/Firewall/FilterRule.php
+5
-0
Plugin.php
src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php
+3
-0
No files found.
src/opnsense/mvc/app/library/OPNsense/Firewall/FilterRule.php
View file @
1a3cd61d
...
...
@@ -313,6 +313,11 @@ class FilterRule
if
(
!
empty
(
$interface
)
&&
empty
(
$this
->
interfaceMapping
[
$interface
][
'if'
]))
{
$tmp
[
'disabled'
]
=
true
;
}
// disable rules when gateway is down and skip_rules_gw_down is set
if
(
!
empty
(
$tmp
[
'skip_rules_gw_down'
])
&&
!
empty
(
$tmp
[
'gateway'
])
&&
empty
(
$this
->
gatewayMapping
[
$tmp
[
'gateway'
]]))
{
$tmp
[
'disabled'
]
=
true
;
}
if
(
!
isset
(
$tmp
[
'quick'
]))
{
// all rules are quick by default except floating
$tmp
[
'quick'
]
=
!
isset
(
$rule
[
'floating'
])
?
true
:
false
;
...
...
src/opnsense/mvc/app/library/OPNsense/Firewall/Plugin.php
View file @
1a3cd61d
...
...
@@ -51,6 +51,9 @@ class Plugin
if
(
!
empty
(
Config
::
getInstance
()
->
object
()
->
system
->
disablereplyto
))
{
$this
->
systemDefaults
[
'disablereplyto'
]
=
true
;
}
if
(
!
empty
(
Config
::
getInstance
()
->
object
()
->
system
->
skip_rules_gw_down
))
{
$this
->
systemDefaults
[
'skip_rules_gw_down'
]
=
true
;
}
}
/**
...
...
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