diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-08-02 18:12:17 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-08-02 18:12:17 +0100 |
commit | afd3a86278c8a5f3f868175048be1dd9ad6a8c62 (patch) | |
tree | dcd725cb298d8d41cdcc79df67b8c3e601dded45 /src | |
parent | 00cf45f488581156f53d1ecba49fca197db909f5 (diff) | |
download | rspamd-afd3a86278c8a5f3f868175048be1dd9ad6a8c62.tar.gz rspamd-afd3a86278c8a5f3f868175048be1dd9ad6a8c62.zip |
[Fix] Fix pushing country to clickhouse asn table
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/clickhouse.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lua/clickhouse.lua b/src/plugins/lua/clickhouse.lua index 3af60a7a0..08fb25c8c 100644 --- a/src/plugins/lua/clickhouse.lua +++ b/src/plugins/lua/clickhouse.lua @@ -573,7 +573,7 @@ local function clickhouse_collect(task) -- ASN information if settings['asn_table'] then - local asn, country, ipnet = 'unknown', 'unknown', 'unknown' + local asn, country, ipnet = 'UN', 'UN', 'UN' local pool = task:get_mempool() ret = pool:get_variable("asn") if ret then @@ -581,7 +581,7 @@ local function clickhouse_collect(task) end ret = pool:get_variable("country") if ret then - country = ret + country = ret:sub(1, 2) end ret = pool:get_variable("ipnet") if ret then |