Skip to content

[9.18] Recreate listeners on DNS transport change

Artem Boldariev requested to merge 4528-honor-listen-on-changes-v9.18 into bind-9.18

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.

Backport of !8644 (merged)

Closes #4518 (closed), #4528 (closed)

Edited by Michał Kępień

Merge request reports