Deprecate source port configuration
Deprecate the definition of the source ports and rely on the operating system to provide reasonable ephemeral port range for outgoing UDP and TCP connections.
Specifying outgoing ports is a bad practice, it's already discouraged, it's prone to errors (it's not only specifying single port, but specifying not enough ports removes a layer of protection) and is already full of caveats like:
.. note:: The address specified in the :any:`query-source` option is used for both
UDP and TCP queries, but the port applies only to UDP queries. TCP
queries always use a random unprivileged port.
.. warning:: Specifying a single port is discouraged, as it removes a layer of
protection against spoofing errors.
.. warning:: The configured :term:`port` must not be the same as the listening port.
The deprecation will include:
- specifying port in the following statements:
query-source
query-source-v6
transfer-source
transfer-source-v6
notify-source
notify-source-v6
parental-source
parental-source-v6
- the following statements as a whole:
use-v4-udp-ports
use-v6-udp-ports
avoid-v4-udp-ports
avoid-v6-udp-ports
See #3843 (closed) for the corresponding option removal issue.
Edited by Michał Kępień