From 33eddc9bc05ebf993fa262b2ba5850461d8b65a2 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 11 Sep 2015 13:27:58 +1000 Subject: [PATCH] 4201. [func] The default preferred-glue is now the address record type of the transport the query was received over. [RT #40468] (cherry picked from commit a0ef8211d3bb5d4a7e56145e014c3da3466051c8) --- CHANGES | 4 ++++ bin/named/client.c | 6 ++++++ doc/arm/Bv9ARM-book.xml | 4 +++- doc/arm/notes.xml | 6 ++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 248dedad7f..f6e1a539e4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +4201. [func] The default preferred-glue is now the address record + type of the transport the query was received + over. [RT #40468] + 4200. [cleanup] win32: update BINDinstall to be BIND release independent. [RT #38915] diff --git a/bin/named/client.c b/bin/named/client.c index de2d596c88..aa7be05450 100644 --- a/bin/named/client.c +++ b/bin/named/client.c @@ -953,6 +953,12 @@ ns_client_send(ns_client_t *client) { else if (client->view->preferred_glue == dns_rdatatype_aaaa) preferred_glue = DNS_MESSAGERENDER_PREFER_AAAA; } + if (preferred_glue == 0) { + if (isc_sockaddr_pf(&client->peeraddr) == AF_INET) + preferred_glue = DNS_MESSAGERENDER_PREFER_A; + else + preferred_glue = DNS_MESSAGERENDER_PREFER_AAAA; + } #ifdef ALLOW_FILTER_AAAA_ON_V4 /* diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml index b30ac2f974..9fa57350d7 100644 --- a/doc/arm/Bv9ARM-book.xml +++ b/doc/arm/Bv9ARM-book.xml @@ -5356,7 +5356,9 @@ badresp:1,adberr:0,findfail:0,valfail:0] If specified, the listed type (A or AAAA) will be emitted before other glue in the additional section of a query response. - The default is not to prefer any type (NONE). + The default is to prefer A records when responding + to queries that arrived via IPv4 and AAAA when + responding to queries that arrived via IPv6. diff --git a/doc/arm/notes.xml b/doc/arm/notes.xml index a07cd8d803..5b00a68386 100644 --- a/doc/arm/notes.xml +++ b/doc/arm/notes.xml @@ -177,6 +177,12 @@ as specified in RFC 6763. [RT #37889] + + + The default preferred glue is now the address type of the + transport the query was received over. + +