commit a20ac6e: [Fix] Fix lua_ip_equal logic

Wessel Dankers wsl at uvt.nl
Fri Sep 20 08:56:05 UTC 2019


Author: Wessel Dankers
Date: 2019-09-19 17:36:59 +0200
URL: https://github.com/rspamd/rspamd/commit/a20ac6ef142cff3fd91ec5b8a585f198d97229ad (refs/pull/3044/head)

[Fix] Fix lua_ip_equal logic

---
 src/lua/lua_ip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lua/lua_ip.c b/src/lua/lua_ip.c
index 1d44af2bf..942817b5c 100644
--- a/src/lua/lua_ip.c
+++ b/src/lua/lua_ip.c
@@ -490,7 +490,7 @@ lua_ip_equal (lua_State *L)
 	gboolean res = FALSE;
 
 	if (ip1 && ip2 && ip1->addr && ip2->addr) {
-		res = rspamd_inet_address_compare (ip1->addr, ip2->addr, TRUE);
+		res = rspamd_inet_address_compare (ip1->addr, ip2->addr, TRUE) == 0;
 	}
 
 	lua_pushboolean (L, res);


More information about the Commits mailing list