]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Save nameserver name when parsing upstreams from resolv.conf
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 26 Nov 2017 22:43:21 +0000 (22:43 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 26 Nov 2017 22:43:21 +0000 (22:43 +0000)
src/libutil/upstream.c

index 5d421b212c9af51156e2c9ef46d79f5ec28d4d3e..71b8de877b81444e3a0c8044154df678c633c649 100644 (file)
@@ -612,8 +612,8 @@ rspamd_upstreams_add_upstream (struct upstream_list *ups, const gchar *str,
                break;
        case RSPAMD_UPSTREAM_PARSE_NAMESERVER:
                addrs = g_ptr_array_sized_new (1);
-
                ret = rspamd_parse_inet_address (&addr, str, strlen (str));
+               up->name = rspamd_mempool_strdup (ups->ctx->pool, str);
 
                if (ret) {
                        if (rspamd_inet_address_get_port (addr) == 0) {