+ttl.test.dyndns:127.0.0.1:3600
:delete-add.test.dyndns:16:\034Should\040be\040gone\040after\040a\040while:3600
:txt.test.dyndns:16:\021This\040is\040some\040text:3600
+:xautosplit.test.dyndns:16:\377They\040fixed\040up\040the\040corner\040store\040like\040it\040was\040a\040nightclub\040-\040It\047s\040permanently\040disco\040-\040Everyone\040is\040dressed\040so\040oddly\040I\040can\047t\040recognize\040them\040-\040I\040can\047t\040tell\040the\040staff\040from\040the\040customers\040-\040Baby\040check\040this\040out\054\040I\047ve\040got\040something\040to\040say\040-\040Man\054\040it\047s\040so\040loud\040in\040here\040S-\040When\040they\040stop\040the\040drum\040machine\040and\040I\040can\040think\040again\040-\040I\047ll\040remember\040what\040it\040was:3600
@test.dyndns::host-1.test.dyndns.:10:3600
@test.dyndns::host-2.test.dyndns.:20:3600
Ccname1.test.dyndns:host-1.test.dyndns.:3600
+#include "dnswriter.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
recordsToDelete.push_back(rec);
}
if (rr->d_class == QClass::NONE) { // 3.4.2.4
- if (rrType == rec.qtype && rec.getZoneRepresentation() == rr->d_content->getZoneRepresentation())
+ auto repr = rec.getZoneRepresentation();
+ if (rec.qtype == QType::TXT) {
+ DLOG(g_log<<msgPrefix<<"Adjusting TXT content from ["<<repr<<"]"<<endl);
+ auto drc = DNSRecordContent::mastermake(rec.qtype.getCode(), QClass::IN, repr);
+ auto ser = drc->serialize(rec.qname, true, true);
+ auto rc = DNSRecordContent::deserialize(rec.qname, rec.qtype.getCode(), ser);
+ repr = rc->getZoneRepresentation(true);
+ DLOG(g_log<<msgPrefix<<"Adjusted TXT content to ["<<repr<<"]"<<endl);
+ }
+ DLOG(g_log<<msgPrefix<<"Matching RR in RRset - (adjusted) representation from request=["<<repr<<"], rr->d_content->getZoneRepresentation()=["<<rr->d_content->getZoneRepresentation()<<"]"<<endl);
+ if (rrType == rec.qtype && repr == rr->d_content->getZoneRepresentation())
recordsToDelete.push_back(rec);
else
rrset.push_back(rec);
-#!/bin/sh
+#!/bin/sh -x
## add + delete with explicit data
# check if the record was deleted.
cleandig test.dyndns TXT
+## now remove the overly long entry that was autosplit
+
+# check that it exists now
+cleandig xautosplit.test.dyndns TXT
+
+# delete it
+cleannsupdate <<!
+server $nameserver $port
+zone test.dyndns
+update delete xautosplit.test.dyndns. TXT "They fixed up the corner store like it was a nightclub - It's permanently disco - Everyone is dressed so oddly I can't recognize them - I can't tell the staff from the customers - Baby check this out, I've got something to say - Man, it's so loud in here " "- When they stop the drum machine and I can think again - I'll remember what it was"
+send
+answer
+!
+
+# check that it is gone
+cleandig xautosplit.test.dyndns TXT
1 test.dyndns. IN SOA 3600 ns1.test.dyndns. ahu.example.dyndns. 2022070136 28800 7200 604800 86400
Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
Reply to question for qname='test.dyndns.', qtype=TXT
+0 xautosplit.test.dyndns. IN TXT 3600 "They fixed up the corner store like it was a nightclub - It's permanently disco - Everyone is dressed so oddly I can't recognize them - I can't tell the staff from the customers - Baby check this out, I've got something to say - Man, it's so loud in here " "- When they stop the drum machine and I can think again - I'll remember what it was"
+Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='xautosplit.test.dyndns.', qtype=TXT
+Answer:
+;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: [id]
+;; flags: qr aa; ZONE: 1, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
+;; ZONE SECTION:
+;test.dyndns. IN SOA
+
+1 test.dyndns. IN SOA 3600 ns1.test.dyndns. ahu.example.dyndns. 2022070137 28800 7200 604800 86400
+Rcode: 3 (Non-Existent domain), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='xautosplit.test.dyndns.', qtype=TXT
sub IN NS ns1.test.dyndns.
sub IN NS ns2.test.dyndns.
+
+; unlike other records in this zone, the record below will actually disappear during the 1dyndns-update-add-delete-txt test
+xautosplit IN TXT "They fixed up the corner store like it was a nightclub - It's permanently disco - Everyone is dressed so oddly I can't recognize them - I can't tell the staff from the customers - Baby check this out, I've got something to say - Man, it's so loud in here - When they stop the drum machine and I can think again - I'll remember what it was"