]> source.dussan.org Git - rspamd.git/commitdiff
[Feature] Reuse maps in multimap module more aggressively
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 7 Jul 2018 12:32:32 +0000 (13:32 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 7 Jul 2018 12:32:32 +0000 (13:32 +0100)
src/plugins/lua/multimap.lua

index 8a2b21ddfc859873ccfc9166db3b9422a2774c79..18a66a23f382938a75c79ea1910b30f42f488593 100644 (file)
@@ -895,8 +895,8 @@ local function add_multimap_rule(key, newrule)
   else
     if type(newrule['map']) == 'string' then
       local map = urls[newrule['map']]
-      if map and map['type'] == newrule['type']
-        and map['regexp'] == newrule['regexp'] then
+      if map and map['regexp'] == newrule['regexp'] and
+          map['glob'] == newrule['glob'] then
         if newrule['type'] == 'ip' then
           newrule['radix'] = map['map']
         else