MCPcopy
hub / github.com/evilsocket/opensnitch / sortRules

Method sortRules

daemon/rule/loader.go:368–378  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

366}
367
368func (l *Loader) sortRules() {
369 l.activeRules = make([]string, 0, len(l.rules))
370 for k, r := range l.rules {
371 // exclude not enabled rules from the list of active rules
372 if !r.Enabled {
373 continue
374 }
375 l.activeRules = append(l.activeRules, k)
376 }
377 sort.Strings(l.activeRules)
378}
379
380func (l *Loader) addUserRule(rule *Rule) {
381 if rule.Duration == Once {

Callers 5

DeleteMethod · 0.95
loadRuleMethod · 0.95
replaceUserRuleMethod · 0.95
scheduleTemporaryRuleMethod · 0.95
testSortRulesFunction · 0.80

Calls

no outgoing calls

Tested by 1

testSortRulesFunction · 0.64