From: Mark Andrews Date: Tue, 28 Nov 2023 06:26:41 +0000 (+1100) Subject: Zone transfers should honour -4 and -6 options X-Git-Tag: v9.18.28~15^2~6 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=7a9ac0491f31b38b3857b5fefb128169b158ef95;p=thirdparty%2Fbind9.git Zone transfers should honour -4 and -6 options Check if the address family has been disabled when transferring zones. (cherry picked from commit ecdde04e63277e2bed8d1d861470de80ab0f49e1) --- diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 8b97304c6f0..8a6013b5c67 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -14464,8 +14464,12 @@ again: INSIST(zone->curprimary < zone->primariescnt); zone->primaryaddr = zone->primaries[zone->curprimary]; - isc_netaddr_fromsockaddr(&primaryip, &zone->primaryaddr); + + if (isc_sockaddr_disabled(&zone->primaryaddr)) { + goto skip_primary; + } + /* * First, look for a tsig key in the primaries statement, then * try for a server key.