From: Stefan Metzmacher Date: Fri, 9 Nov 2012 07:55:40 +0000 (+0100) Subject: lib/addns: remove pointless check for resp->num_additionals != 1 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=5263d4b5323b7053d87321e7208bed44d95410a0;p=metze%2Fsamba%2Fwip.git lib/addns: remove pointless check for resp->num_additionals != 1 We never use resp->additionals, so there's no reason to check. This fixes dns updates against BIND9 (used in a Samba4 domain). Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett (cherry picked from commit b59c5db5f74f56c0536635a41ae51c389109ceb5) --- diff --git a/lib/addns/dnsgss.c b/lib/addns/dnsgss.c index c9037417da95..fe7c6ca536e5 100644 --- a/lib/addns/dnsgss.c +++ b/lib/addns/dnsgss.c @@ -175,8 +175,7 @@ static DNS_ERROR dns_negotiate_gss_ctx_int( TALLOC_CTX *mem_ctx, * TODO: Compare id and keyname */ - if ((resp->num_additionals != 1) || - (resp->num_answers == 0) || + if ((resp->num_answers == 0) || (resp->answers[0]->type != QTYPE_TKEY)) { err = ERROR_DNS_INVALID_MESSAGE; goto error;