From 305cf6ab9bd4eef96449c65c785699823cc9a2f5 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Wed, 11 Oct 2017 12:26:00 +0200 Subject: [PATCH] pdnsutil: Set domain masters to the full list Before, only the last master of all the master would eb added becuase of the way DNSBackend::setMaster() is implemented in gsql backends. --- pdns/pdnsutil.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index db522db8d6..50446ebd64 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -3241,9 +3241,15 @@ try if (!tgt->createDomain(di.zone)) throw PDNSException("Failed to create zone"); tgt->setKind(di.zone, di.kind); tgt->setAccount(di.zone,di.account); + string masters=""; + bool first = true; for(const string& master: di.masters) { - tgt->setMaster(di.zone, master); + if (!first) + masters += ", "; + first = false; + masters += master; } + tgt->setMaster(di.zone, masters); // move records if (!src->list(di.zone, di.id, true)) throw PDNSException("Failed to list records"); nr=0; -- 2.47.2