doAgeCache may fail in certain cases. #438

Closed
Habbie opened this Issue Apr 26, 2013 · 2 comments

Projects

None yet

1 participant

@Habbie
Member
Habbie commented Apr 26, 2013

doAgeCache is using

int32_t ttl = iter->getTTD() - now;

to discover the earliest TTD. But if there are expired AND not expired RRs, the condition

if(ttl < 0)
  return false;  // would be dead anyhow

returns false even though there are still valid RRs that need to be aged.

Attached the patch suggestion.

@Habbie Habbie was assigned Apr 26, 2013
@Habbie Habbie closed this Apr 26, 2013
@Habbie Habbie added a commit that referenced this issue Apr 26, 2013
@Habbie Habbie doAgeCache would sometimes get confused when we mixed expired and non…
…-expired records. Report and patch by Winfried Angele. Closes #438

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3068 d19b8d6e-7fed-0310-83ef-9ca221ded41b
e06f9f1
@Habbie
Member
Habbie commented Apr 26, 2013

Attachment '' (doAgeCache.patch) https://gist.github.com/5466733

@Habbie
Member
Habbie commented Apr 26, 2013

Author: peter
r3068, thanks!

@mind04 mind04 pushed a commit to mind04/pdns that referenced this issue Apr 26, 2013
peter doAgeCache would sometimes get confused when we mixed expired and non…
…-expired records. Report and patch by Winfried Angele. Closes #438

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3068 d19b8d6e-7fed-0310-83ef-9ca221ded41b
cb378e5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment