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

rec: Implement settable AXFR timeout for RPZ #6290

Merged
merged 3 commits into from Feb 23, 2018

Conversation

Projects
None yet
2 participants
@pieterlexis
Member

pieterlexis commented Feb 21, 2018

Short description

This allows the operator to set the timeout of the AXFR transaction. This can be handy when the zone is huge or the link is slow.

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)
@rgacogne

Looks good, a couple nits but nothing preventing a merge.

@@ -189,8 +189,10 @@ shared_ptr<SOARecordContent> loadRPZFromServer(const ComboAddress& master, const
Resolver::res_t nop;
vector<DNSRecord> chunk;
time_t last=0;
time_t axfrStart = time(0);

This comment has been minimized.

@rgacogne

rgacogne Feb 21, 2018

Member

s/time(0)/time(nullptr)` would be more consistent.

@@ -205,6 +207,10 @@ shared_ptr<SOARecordContent> loadRPZFromServer(const ComboAddress& master, const
RPZRecordToPolicy(dr, zone, true, defpol, maxTTL);
nrecords++;
}
axfrNow = time(nullptr);
if (axfrNow - axfrStart > axfrTimeout) {

This comment has been minimized.

@rgacogne

rgacogne Feb 21, 2018

Member

Perhaps we should check that axfrNow >= axfrStart in case the time goes backward because of NTP adjustment for example

@pieterlexis pieterlexis referenced this pull request Feb 22, 2018

Merged

Backport: rec: Implement settable AXFR timeout for RPZ #6298

5 of 7 tasks complete

@pieterlexis pieterlexis merged commit a64a47c into PowerDNS:master Feb 23, 2018

1 check passed

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

@pieterlexis pieterlexis deleted the pieterlexis:rec-axfr-timeout branch Feb 23, 2018

@rgacogne rgacogne added this to the rec-4.2.0 milestone Mar 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment