dns: Simplify logic a bit
authorVolker Lendecke <vl@samba.org>
Thu, 31 May 2018 18:56:31 +0000 (20:56 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 1 Jun 2018 09:28:22 +0000 (11:28 +0200)
We've done an early return if (!found_tsig) a few lines before.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source4/dns_server/dns_crypto.c

index 0be9b82..c8b5c46 100644 (file)
@@ -123,7 +123,7 @@ WERROR dns_verify_tsig(struct dns_server *dns,
        }
 
        /* The TSIG record needs to be the last additional record */
-       if (found_tsig && i + 1 != packet->arcount) {
+       if (i + 1 != packet->arcount) {
                DEBUG(1, ("TSIG record not the last additional record!\n"));
                return DNS_ERR(FORMAT_ERROR);
        }