X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Fdns.c;h=f492613c4785f0e8141718cd94198ef7469316cb;hb=4a142059750e1767f19f6d42da7c1ce4316107eb;hp=56f81de7ab73b7408bf4619d5390d7d4a15f50a5;hpb=759601ecf04f4d1c337a9494722b9f6649381072;p=exim.git diff --git a/src/src/dns.c b/src/src/dns.c index 56f81de7a..f492613c4 100644 --- a/src/src/dns.c +++ b/src/src/dns.c @@ -443,7 +443,7 @@ Returns: bool indicating presence of AD bit */ BOOL -dns_is_secure(const dns_answer *dnsa) +dns_is_secure(const dns_answer * dnsa) { #ifdef DISABLE_DNSSEC DEBUG(D_dns) @@ -455,6 +455,13 @@ return h->ad ? TRUE : FALSE; #endif } +static void +dns_set_insecure(dns_answer * dnsa) +{ +HEADER * h = (HEADER *)dnsa->answer; +h->ad = 0; +} + @@ -812,7 +819,7 @@ for (i = 0; i < 10; i++) if (type_rr.data != NULL) { if (!secure_so_far) /* mark insecure if any element of CNAME chain was */ - ((HEADER *)dnsa->answer)->ad = 0; + dns_set_insecure(dnsa); return DNS_SUCCEED; } @@ -1023,7 +1030,7 @@ if (type == T_CSA) /* Extract the numerical SRV fields (p is incremented) */ p = rr->data; GETSHORT(priority, p); - GETSHORT(weight, p); + GETSHORT(weight, p); weight = weight; /* compiler quietening */ GETSHORT(port, p); /* Check the CSA version number */