]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Fixed parsing of faked mx-record: priority goes first and then the value 2411/head
authorMikhail Galanin <mgalanin@mimecast.com>
Fri, 10 Aug 2018 08:05:41 +0000 (09:05 +0100)
committerMikhail Galanin <mgalanin@mimecast.com>
Fri, 10 Aug 2018 08:05:41 +0000 (09:05 +0100)
src/libserver/dns.c

index d75ad00e8641bf615e73476f020aeed833fef146..81b01c49bdc5c23f5114511e94a00929b1a4b891 100644 (file)
@@ -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 {