]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: don't try creating symlink if it already exists
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 19 May 2025 12:48:07 +0000 (14:48 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 19 May 2025 12:49:10 +0000 (14:49 +0200)
I am seeing: FileExistsError: [Errno 17] File exists: '/Users/otto/pdns/pdns/dnsdistdist/dnsdist-rust-lib/dnsdist-configuration-yaml-items-generated.cc' -> './dnsdist-rust-lib//dnsdist-configuration-yaml-items-generated.cc'

after a change in dnsdist-settings-definitions.yml

Plus three typos in docs.

pdns/dnsdistdist/dnsdist-rust-lib/dnsdist-settings-generator.py
pdns/dnsdistdist/dnsdist-settings-definitions.yml
pdns/dnsdistdist/docs/quickstart.rst

index 7a102cb11b60882248ec8f2c2e720acef9e13603..36af03ef4678f3fe2dea0090cc28c9ab19f5d607 100644 (file)
@@ -377,8 +377,9 @@ void convertRuntimeFlatSettingsFromRust(const dnsdist::rust::settings::GlobalCon
 ''')
 
     os.rename(cxx_flat_settings_fp.name, out_file_path + '/dnsdist-configuration-yaml-items-generated.cc')
-    if out_file_path != build_dir_path:
-        os.symlink(os.path.abspath(out_file_path + '/dnsdist-configuration-yaml-items-generated.cc'), build_dir_path + '/dnsdist-configuration-yaml-items-generated.cc')
+    target = build_dir_path + '/dnsdist-configuration-yaml-items-generated.cc'
+    if out_file_path != build_dir_path and not os.path.exists(target):
+        os.symlink(os.path.abspath(out_file_path + '/dnsdist-configuration-yaml-items-generated.cc'), target)
 
 def generate_actions_config(output, def_dir, response, default_functions):
     suffix = 'ResponseAction' if response else 'Action'
index 3a2e5acf42955db924a1625b9385e57fecfe47cb..00267d885df6753cb3c7017c5e3787a53aab87cb 100644 (file)
@@ -1551,14 +1551,14 @@ tcp_tuning:
       lua-name: "setMaxTLSNewSessionRatePerClient"
       internal-field-name: "d_maxTLSNewSessionsRatePerClient"
       runtime-configurable: false
-      description: "Set the maximum number of new TLS sessions, without resumption, that a given client (see ``connections_mask_v4``, ``connections_mask_v6`` and ``connection_mask_v4_port`` to see how clients can be aggregated) can open, per second, over the last ``connection_rate_interval`` minutes. Clients exceeding this rate will not be able to open new TCP connections for ``ban_duration_for_exceeding_tcp_tls_rate`` seconds. See also ``max_connection_rate_per_client`` and ```max_tls_resumed_session_rate_per_client`"
+      description: "Set the maximum number of new TLS sessions, without resumption, that a given client (see ``connections_mask_v4``, ``connections_mask_v6`` and ``connection_mask_v4_port`` to see how clients can be aggregated) can open, per second, over the last ``connection_rate_interval`` minutes. Clients exceeding this rate will not be able to open new TCP connections for ``ban_duration_for_exceeding_tcp_tls_rate`` seconds. See also ``max_connection_rate_per_client`` and ``max_tls_resumed_session_rate_per_client``"
     - name: "max_tls_resumed_session_rate_per_client"
       type: "u64"
       default: "0"
       lua-name: "setMaxTLSResumedSessionRatePerClient"
       internal-field-name: "d_maxTLSResumedSessionsRatePerClient"
       runtime-configurable: false
-      description: "Set the maximum number of resumed TLS sessions that a given client (see ``connections_mask_v4``, ``connections_mask_v6`` and ``connection_mask_v4_port`` to see how clients can be aggregated) can open, per second, over the last ``connection_rate_interval`` minutes. Clients exceeding this rate will not be able to open new TCP connections for ``ban_duration_for_exceeding_tcp_tls_rate`` seconds. See also ``max_connection_rate_per_client`` and ```max_tls_new_session_rate_per_client`"
+      description: "Set the maximum number of resumed TLS sessions that a given client (see ``connections_mask_v4``, ``connections_mask_v6`` and ``connection_mask_v4_port`` to see how clients can be aggregated) can open, per second, over the last ``connection_rate_interval`` minutes. Clients exceeding this rate will not be able to open new TCP connections for ``ban_duration_for_exceeding_tcp_tls_rate`` seconds. See also ``max_connection_rate_per_client`` and ``max_tls_new_session_rate_per_client``"
     - name: "max_read_ios_per_query"
       type: "u32"
       default: "50"
index e99cb293638359fa5f54a38bdef1de301bafbbbd..5d539b7cfffed18a04156008bf18a5101edcf7eb 100644 (file)
@@ -146,6 +146,7 @@ Adding network ranges to the :term:`ACL` is done with the :func:`setACL` and :fu
 And in ``yaml`` format:
 
 .. code-block:: yaml
+
 acl:
   - "192.0.2.0/28"
   - "2001:db8:1::/56"