[PATCH 2/2] dns: Support larger queries when asking forwarder

Michael Adam obnox at samba.org
Wed May 29 01:30:18 MDT 2013


Hi Matthieu,

you may have missed that these patches have already gone to
master. (See the discussion on the following set of 2 patches
to add RP and HINFO records.

You might propose a follow-up patch... :-)

Cheers - Michael

On 2013-05-28 at 23:45 -0700, Matthieu Patou wrote:
> On 05/25/2013 04:21 AM, Kai Blin wrote:
> >This should fix bug #9632
> >
> >...
> >diff --git a/source4/dns_server/dns_utils.c b/source4/dns_server/dns_utils.c
> >index e03a409..21c7f5a 100644
> >--- a/source4/dns_server/dns_utils.c
> >+++ b/source4/dns_server/dns_utils.c
> >@@ -378,3 +378,24 @@ WERROR dns_name2dn(struct dns_server *dns,
> >  	*_dn = dn;
> >  	return WERR_OK;
> >  }
> >+
> >+WERROR dns_generate_options(struct dns_server *dns,
> >+			    TALLOC_CTX *mem_ctx,
> >+			    struct dns_res_rec **options)
> >+{
> >+	struct dns_res_rec *o;
> >+
> >+	o = talloc_zero(mem_ctx, struct dns_res_rec);
> >+	if (o == NULL) {
> >+		return WERR_NOMEM;
> >+	}
> >+	o->name = '\0';
> >+	o->rr_type = DNS_QTYPE_OPT;
> >+	/* This is ugly, but RFC2671 wants the payload size in this field */
> >+	o->rr_class = (enum dns_qclass) dns->max_payload;
> >+	o->ttl = 0;
> >+	o->length = 0;
> >+
> >+	*options = o;
> >+	return WERR_OK;
> >+}
> I'm not a huge fan of the short 'o' here, opt is almost as short.
> 
> If you can fix this consider that you have my review here as well.
> 
> Thanks.
> Matthieu
> 
> -- 
> Matthieu Patou
> Samba Team
> http://samba.org
> 


More information about the samba-technical mailing list