solanum-ircd / solanum

An IRCd for unified networks
https://solanum.chat/
GNU General Public License v2.0
216 stars 53 forks source link

authd: fix crash/restart breaking DNSBL lookups #394

Closed aaronmdjones closed 1 year ago

aaronmdjones commented 1 year ago

authd child processes are only told about configured DNSBLs when the configuration is being parsed.

This is bad, because when authd crashes or is killed, IRCd will restart it, but will not tell it about any configured DNSBLs until IRCd is next rehashed.

We already have a dictionary that stores configured DNSBLs (for hit statistics for STATS n), so store the additional needed fields in that structure, and loop over that dictionary's entries when authd is restarted, sending the fields just as if the configuration were being reloaded.

Reported-By: @Unit193