aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_upstream.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-07-02 12:30:08 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-07-02 12:30:08 +0100
commit1812d38cb85eb3766e1ed0adbf75b57475af6b0e (patch)
tree4cb04b19f6bb7469b3269b2a5ef44df4d6bb95b6 /src/lua/lua_upstream.c
parente03e1d6bfbd976ec23af197d0d88ccff1933e430 (diff)
downloadrspamd-1812d38cb85eb3766e1ed0adbf75b57475af6b0e.tar.gz
rspamd-1812d38cb85eb3766e1ed0adbf75b57475af6b0e.zip
[Feature] Distinguish IP failures from connection failures
Diffstat (limited to 'src/lua/lua_upstream.c')
-rw-r--r--src/lua/lua_upstream.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lua/lua_upstream.c b/src/lua/lua_upstream.c
index e403d34af..0d1246229 100644
--- a/src/lua/lua_upstream.c
+++ b/src/lua/lua_upstream.c
@@ -124,9 +124,15 @@ static gint
lua_upstream_fail (lua_State *L)
{
struct upstream *up = lua_check_upstream (L);
+ gboolean fail_addr = FALSE;
if (up) {
- rspamd_upstream_fail (up);
+
+ if (lua_isboolean (L, 2)) {
+ fail_addr = lua_toboolean (L, 2);
+ }
+
+ rspamd_upstream_fail (up, fail_addr);
}
return 0;