]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix lua_ip_equal logic 3044/head
authorWessel Dankers <wsl@uvt.nl>
Thu, 19 Sep 2019 15:36:59 +0000 (17:36 +0200)
committerWessel Dankers <wsl@uvt.nl>
Thu, 19 Sep 2019 15:36:59 +0000 (17:36 +0200)
src/lua/lua_ip.c

index 1d44af2bfe01d25553692e050f71f0f842b79606..942817b5ca6a302806c257d44cc75773921d37bd 100644 (file)
@@ -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);