From 22a544eec85560a54fedce85c24a2c7925bcd6cc Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 20 Apr 2017 20:09:06 +0100 Subject: [PATCH] [Minor] Try all hostname regexps to find the most significant one --- src/plugins/lua/hfilter.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/lua/hfilter.lua b/src/plugins/lua/hfilter.lua index 80d289d45..cbbb9c2ee 100644 --- a/src/plugins/lua/hfilter.lua +++ b/src/plugins/lua/hfilter.lua @@ -389,8 +389,9 @@ local function hfilter(task) else for regexp,weight in pairs(checks_hellohost) do if check_regexp(hostname, regexp) then - weight_hostname = weight - break + if weight > weight_hostname then + weight_hostname = weight + end end end end -- 2.39.5