Skip to content

Recreate listeners on DNS transport change when editing listen-on statements before reconfiguration

Artem Boldariev requested to merge 4528-honor-listen-on-changes into main

This commit ensures that listeners are recreated on reconfiguration in the case when their type changes (or when PROXY protocol type changes, too).

Previously, if a "listen-on" statement was modified to represent a different transport, BIND would not pick-up the change on reconfiguration if listener type changes (e.g. DoH -> DoT) for a given interface address and port combination. This commit fixes that by recreating the listener.

Initially, that worked for most of the new transports as we would recreate listeners on each reconfiguration for DoH and DoT. But at some point we changed that in such a way that listeners were not recreated to avoid rebinding a port as on some platforms only root can do that for port numbers <1000, making some ports binding possible only on start-up. We chose to asynchronously update listener socket settings (like TLS contexts, HTTP settings) instead.

Now, we both avoid recreating the sockets if unnecessary and recreate listeners when listener type changes.

Closes #4528 (closed) #4518 (closed)

Merge request reports