mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 00:24:40 +01:00
schedule temp rules only if enabled
Avoid scheduling temporary rules if they're not enabled.
This commit is contained in:
parent
4a37c88db6
commit
07a4077a6a
1 changed files with 2 additions and 2 deletions
|
@ -267,7 +267,7 @@ func (l *Loader) loadRule(fileName string) error {
|
|||
l.rules[r.Name] = &r
|
||||
l.sortRules()
|
||||
|
||||
if l.isTemporary(&r) {
|
||||
if r.Enabled && l.isTemporary(&r) {
|
||||
err = l.scheduleTemporaryRule(r)
|
||||
}
|
||||
|
||||
|
@ -408,7 +408,7 @@ func (l *Loader) replaceUserRule(rule *Rule) (err error) {
|
|||
l.sortRules()
|
||||
l.Unlock()
|
||||
|
||||
if l.isTemporary(rule) {
|
||||
if rule.Enabled && l.isTemporary(rule) {
|
||||
err = l.scheduleTemporaryRule(*rule)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue