Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove d_place from DNSResourceRecord #4549

Merged
merged 7 commits into from
Feb 23, 2017
Merged

Conversation

zeha
Copy link
Collaborator

@zeha zeha commented Oct 7, 2016

Now that DNSResourceRecords are only supposed to be created by backends, they certainly have no say in the DNSPacket positioning.

The DNSResourceRecord(DNSRecord&) constructor is renamed to DNSResourceRecord::fromWire and records going into packets are only ever converted from DNSResourceRecord (backend type) -> DNSRecord (wire type). This makes it safe to remove d_place from DNSResourceRecord and default to ANSWER in DNSRecord.

Finally FindNS::lookup(..., UeberBackend) goes away. Master/Slave support now really requires backends filling out DomainInfo.backend in getUpdatedMasters, all in-tree backends do that AFAICT.

Also drops serialize.

@zeha zeha added the auth label Oct 7, 2016
@zeha zeha added this to the auth-4.1.0 milestone Oct 7, 2016
@zeha zeha force-pushed the dnsrr branch 5 times, most recently from 5d46e73 to 542a822 Compare October 7, 2016 14:53
@zeha
Copy link
Collaborator Author

zeha commented Oct 24, 2016

Rebased.

Now that DNSResourceRecords are only supposed to be created by backends, they certainly have no say in the DNSPacket positioning.
The slave code did not pay attention to d_place in the received
DNSResourceRecords anyway, so throwing away that info is alright.
@zeha
Copy link
Collaborator Author

zeha commented Dec 8, 2016

Rebased.

@pieterlexis
Copy link
Contributor

I feel this makes it all more clean. @mind04, any comments?

B->lookup(QType(QType::NS),domain);
while(B->get(rr))
di.backend->lookup(QType(QType::NS), di.zone);
while(di.backend->get(rr))
nsset.insert(rr.content);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the change from B to di.backend here. This change is modifying notify behaviour in multi backend setups. If there are two backends, and the NS records for a given name live in the first backend, with no NS records in the second backend (with the SOA) powerdns was using the records from the first backend for the notify.
After this change no notifications are sent out for the domain because there are no NS records in the second backend (with the SOA).
It is inconsistent if no notifications are send out but powerdns is returning NS records for a normal query. If both backend have differnt NS records thing are even more interesting. Notifications are sent to the nameservers from the second backend and a NS query is returning the ones from the first...

Overriding records is a common use case for multi backend setups, so I my opinion this change is not improving thing.

@ahupowerdns ahupowerdns merged commit 56d692a into PowerDNS:master Feb 23, 2017
@zeha zeha deleted the dnsrr branch February 26, 2017 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants