diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-07-02 12:30:08 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-07-02 12:30:08 +0100 |
commit | 1812d38cb85eb3766e1ed0adbf75b57475af6b0e (patch) | |
tree | 4cb04b19f6bb7469b3269b2a5ef44df4d6bb95b6 /src/lua | |
parent | e03e1d6bfbd976ec23af197d0d88ccff1933e430 (diff) | |
download | rspamd-1812d38cb85eb3766e1ed0adbf75b57475af6b0e.tar.gz rspamd-1812d38cb85eb3766e1ed0adbf75b57475af6b0e.zip |
[Feature] Distinguish IP failures from connection failures
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_upstream.c | 8 |
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; |