comparison src/context.cpp @ 419:91f2a127ec69 stable-6-0-57

spf code now handles mx,exists,ptr tags, multiple A records, %{i} macro
author Carl Byington <carl@five-ten-sg.com>
date Wed, 26 Apr 2017 09:20:35 -0700
parents d1976e04f5ba
children 22027ad2a28f
comparison
equal deleted inserted replaced
418:ea4f86e2db42 419:91f2a127ec69
1211 dns_interface(*priv, b, ns_t_a, false, NULL, buf, maxlen); 1211 dns_interface(*priv, b, ns_t_a, false, NULL, buf, maxlen);
1212 uint32_t *a = (uint32_t *)buf; 1212 uint32_t *a = (uint32_t *)buf;
1213 size_t c = a[0]; 1213 size_t c = a[0];
1214 for (size_t i=1; i<=c; i++) { 1214 for (size_t i=1; i<=c; i++) {
1215 uint32_t ipy = ntohl(a[i]); 1215 uint32_t ipy = ntohl(a[i]);
1216 char adr[sizeof "255.255.255.255 "]; //!!
1217 adr[0] = '\0'; //!!
1218 inet_ntop(AF_INET, (const u_char *)&(a[i]), adr, sizeof(adr)); //!!
1219 log(priv->queueid, "found mx a %s", adr); //!!
1216 if (ipy == ip) { 1220 if (ipy == ip) {
1217 log(priv->queueid, "match mx:%s", name); 1221 log(priv->queueid, "match mx:%s", name);
1218 return true; 1222 return true;
1219 } 1223 }
1220 } 1224 }