diff --git a/src/common/core/badbehavior/badbehavior.lua b/src/common/core/badbehavior/badbehavior.lua index dacd77051..ea6220551 100644 --- a/src/common/core/badbehavior/badbehavior.lua +++ b/src/common/core/badbehavior/badbehavior.lua @@ -21,7 +21,7 @@ end function badbehavior:log() -- Check if we are whitelisted - if is_whitelisted(self.ctx) == "yes" then + if is_whitelisted(self.ctx) then return self:ret(true, "client is whitelisted") end -- Check if bad behavior is activated diff --git a/src/common/core/order.json b/src/common/core/order.json index cbcfeb2e0..30b79a494 100644 --- a/src/common/core/order.json +++ b/src/common/core/order.json @@ -42,6 +42,13 @@ "reversescan" ], "log_stream": ["badbehavior", "bunkernet"], - "log_default": ["badbehavior", "bunkernet", "errors", "misc", "metrics"], + "log_default": [ + "whitelist", + "badbehavior", + "bunkernet", + "errors", + "misc", + "metrics" + ], "timer": ["metrics"] } diff --git a/src/common/core/whitelist/whitelist.lua b/src/common/core/whitelist/whitelist.lua index 880c27de0..3e316d69f 100644 --- a/src/common/core/whitelist/whitelist.lua +++ b/src/common/core/whitelist/whitelist.lua @@ -170,6 +170,10 @@ function whitelist:preread() return self:access() end +function whitelist:log_default() + return self:access() +end + function whitelist:kind_to_ele(kind) if kind == "IP" then return "ip" .. self.ctx.bw.remote_addr