1 From 090856c7e6d483bc4d7ec41f55208a9842769c45 Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Sat, 2 Jun 2018 18:37:07 +0100
4 Subject: [PATCH 13/17] Allow zone transfer in authoritative mode whenever
5 auth-peer is specified.
7 Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
10 man/dnsmasq.8 | 6 +++++-
12 3 files changed, 12 insertions(+), 3 deletions(-)
16 @@ -29,6 +29,10 @@ version 2.80
17 have different parameters and avoids advertising the same
18 prefix twice. Thanks to Luis Marsano for spotting this case.
20 + Allow zone transfer in authoritative mode if auth-peer is specified,
21 + even if auth-sec-servers is not. Thanks to Raphaƫl Halimi for
26 Fix parsing of CNAME arguments, which are confused by extra spaces.
29 @@ -817,7 +817,11 @@ authoritative zones as dnsmasq.
30 Specify the addresses of secondary servers which are allowed to
31 initiate zone transfer (AXFR) requests for zones for which dnsmasq is
32 authoritative. If this option is not given, then AXFR requests will be
33 -accepted from any secondary.
34 +accepted from any secondary. Specifying
38 +enables zone transfer but does not advertise the secondary in NS records returned by dnsmasq.
41 Read the Linux connection track mark associated with incoming DNS
44 @@ -436,8 +436,9 @@ size_t answer_auth(struct dns_header *he
45 if (sockaddr_isequal(peer_addr, &peers->addr))
48 - /* Refuse all AXFR unless --auth-sec-servers is set */
49 - if ((!peers && daemon->auth_peers) || !daemon->secondary_forward_server)
50 + /* Refuse all AXFR unless --auth-sec-servers or auth-peers is set */
51 + if ((!daemon->secondary_forward_server && !daemon->auth_peers) ||
52 + (daemon->auth_peers && !peers))
54 if (peer_addr->sa.sa_family == AF_INET)
55 inet_ntop(AF_INET, &peer_addr->in.sin_addr, daemon->addrbuff, ADDRSTRLEN);