From: Christian Hofstaedtler Date: Wed, 5 Feb 2014 15:26:33 +0000 (+0100) Subject: API: create SOA records with complete content X-Git-Tag: rec-3.6.0-rc1~192^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1265%2Fhead;p=thirdparty%2Fpdns.git API: create SOA records with complete content No surprises when editing an existing SOA, then. --- diff --git a/pdns/ws-auth.cc b/pdns/ws-auth.cc index 6935601533..b5dba216cf 100644 --- a/pdns/ws-auth.cc +++ b/pdns/ws-auth.cc @@ -378,11 +378,14 @@ static void apiServerZones(HttpRequest* req, HttpResponse* resp) { // create SOA record so zone "really" exists DNSResourceRecord rr; rr.qname = zonename; - rr.content = (boost::format("%s hostmaster.%s %d") + rr.content = (boost::format("%s hostmaster@%s %d") % nameservers[SizeType(0)].GetString() % zonename % intFromJson(document, "serial", 1) ).str(); + SOAData sd; + fillSOAData(rr.content, sd); + rr.content = serializeSOAData(sd); rr.qtype = "SOA"; rr.domain_id = di.id; rr.auth = 1;