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

Retry loading RPZ zones from server. #6237

Merged
merged 2 commits into from Feb 13, 2018

Conversation

Projects
None yet
4 participants
@aerique
Member

aerique commented Jan 29, 2018

Short description

Restructured rpzMaster and RPZIXFRTracker so that loading RPZ zones from a server is retried every refresh seconds.

Fixes #6238.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled and tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

aerique added some commits Jan 26, 2018

Fix failure to start RPZIXFRTracker tracker thread.
This is an initial commit and needs more work (but it's 17:07 on a
Friday, so yeah...).

@aerique aerique added this to the rec-4.1.x milestone Jan 29, 2018

@aerique aerique self-assigned this Jan 29, 2018

@aerique aerique requested review from Habbie, pieterlexis and ahupowerdns Jan 29, 2018

@aerique aerique modified the milestones: rec-4.1.x, rec-4.1.2 Jan 29, 2018

@pieterlexis

Looks good! Is it possible to test if this also fixes #4085 for rpzMaster()?

@@ -318,15 +318,38 @@ string reloadAuthAndForwards()
}
void RPZIXFRTracker(const ComboAddress& master, const DNSName& zoneName, boost::optional<DNSFilterEngine::Policy> defpol, uint32_t maxTTL, size_t zoneIdx, const TSIGTriplet& tt, shared_ptr<SOARecordContent> oursr, size_t maxReceivedBytes, const ComboAddress& localAddress)
void RPZIXFRTracker(const ComboAddress& master, boost::optional<DNSFilterEngine::Policy> defpol, uint32_t maxTTL, size_t zoneIdx, const TSIGTriplet& tt, size_t maxReceivedBytes, const ComboAddress& localAddress, std::shared_ptr<DNSFilterEngine::Zone> zone)

This comment has been minimized.

@pieterlexis

pieterlexis Feb 2, 2018

Member

I think we can have a dereferenced zone here:

std::shared_ptr<DNSFilterEngine::Zone>& zone

This comment has been minimized.

@ahupowerdns

ahupowerdns Feb 13, 2018

Member

I'm not too fond of passing references to threads since I never know what it means. Also, copying a shared_ptr is pretty free, so I don't think this is a big win.

@aerique

This comment has been minimized.

Member

aerique commented Feb 2, 2018

I'll have a look at #4085.

edit: @pieterlexis I've attempted to test this with a very large zone but I'm still not sure I'm doing this right. I did not see any blocking though.

@aerique aerique merged commit 209955c into PowerDNS:master Feb 13, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@pieterlexis pieterlexis referenced this pull request Feb 21, 2018

Merged

rec: Ensure we don't hammer the RPZ master server #6293

2 of 6 tasks complete

@pieterlexis pieterlexis referenced this pull request Mar 12, 2018

Merged

rec: Backport RPZ retry patches #6336

3 of 7 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment