From: cthomas Date: Mon, 6 Jan 2020 20:50:16 +0000 (-0500) Subject: move modify into loop with others and skip format check X-Git-Tag: 1.2.0rc1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70cd35358874f3e920c2267360359af76bc63f1d;p=thirdparty%2Fsuricata-update.git move modify into loop with others and skip format check --- diff --git a/suricata/update/main.py b/suricata/update/main.py index ff9d2dd..b926ae8 100644 --- a/suricata/update/main.py +++ b/suricata/update/main.py @@ -1063,12 +1063,10 @@ def _main(): rulemap[rule.id] = fltr.run(rule) drop_count += 1 - # Apply modify filters. - for fltr in modify_filters: - for key, rule in rulemap.items(): + for fltr in modify_filters: if fltr.match(rule): new_rule = fltr.run(rule) - if new_rule and new_rule.format() != rule.format(): + if new_rule: rulemap[rule.id] = new_rule modify_count += 1