Skip to content

Move the dns_db_setloop into cache_create_db()

Ondřej Surý requested to merge 4621-fix-cache-pruning-after-rndc-flush into main

The dns_cache_flush() drops the old database and creates a new one, but it forgets to pass the loop that runs the node pruning and cleaning the rbtdb when flushing it next time. This causes the cleaning to skip cleaning the parent nodes (with .down == NULL) leading to increased memory usage over time until the database is unable to keep up and just stays overmem all the time.

Closes #4621 (closed)

Merge request reports