From: Mikhail Galanin Date: Fri, 10 Aug 2018 08:05:41 +0000 (+0100) Subject: [Minor] Fixed parsing of faked mx-record: priority goes first and then the value X-Git-Tag: 1.8.0~282^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2411%2Fhead;p=thirdparty%2Frspamd.git [Minor] Fixed parsing of faked mx-record: priority goes first and then the value --- diff --git a/src/libserver/dns.c b/src/libserver/dns.c index d75ad00e86..81b01c49bd 100644 --- a/src/libserver/dns.c +++ b/src/libserver/dns.c @@ -385,8 +385,8 @@ rspamd_dns_resolver_config_ucl (struct rspamd_config *cfg, svec = g_strsplit_set (str_rep, " :", -1); if (svec && svec[0] && svec[1]) { - rep->content.mx.name = strdup (svec[0]); - rep->content.mx.priority = strtoul (svec[1], NULL, 10); + rep->content.mx.priority = strtoul (svec[0], NULL, 10); + rep->content.mx.name = strdup (svec[1]); DL_APPEND (replies, rep); } else {