]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix dns64 log output to log the default instead of a null string.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 4 Nov 2025 09:19:03 +0000 (10:19 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 4 Nov 2025 09:19:03 +0000 (10:19 +0100)
dns64/dns64.c
doc/Changelog

index 0de1ac422f608ab7dad086e024dd5a09dcc65ff2..9a407072ef07fe333ddd0d2492fea030c1fdf966 100644 (file)
@@ -366,22 +366,23 @@ static int
 dns64_apply_cfg(struct dns64_env* dns64_env, struct config_file* cfg)
 {
     struct config_strlist* s;
-    verbose(VERB_ALGO, "dns64-prefix: %s", cfg->dns64_prefix);
-    if (!netblockstrtoaddr(cfg->dns64_prefix ? cfg->dns64_prefix :
-                DEFAULT_DNS64_PREFIX, 0, &dns64_env->prefix_addr,
+    const char* dns64_prefix = cfg->dns64_prefix ?
+       cfg->dns64_prefix : DEFAULT_DNS64_PREFIX;
+    verbose(VERB_ALGO, "dns64-prefix: %s", dns64_prefix);
+    if (!netblockstrtoaddr(dns64_prefix, 0, &dns64_env->prefix_addr,
                 &dns64_env->prefix_addrlen, &dns64_env->prefix_net)) {
-        log_err("cannot parse dns64-prefix netblock: %s", cfg->dns64_prefix);
+        log_err("cannot parse dns64-prefix netblock: %s", dns64_prefix);
         return 0;
     }
     if (!addr_is_ip6(&dns64_env->prefix_addr, dns64_env->prefix_addrlen)) {
-        log_err("dns64_prefix is not IPv6: %s", cfg->dns64_prefix);
+        log_err("dns64_prefix is not IPv6: %s", dns64_prefix);
         return 0;
     }
     if (dns64_env->prefix_net != 32 && dns64_env->prefix_net != 40 &&
             dns64_env->prefix_net != 48 && dns64_env->prefix_net != 56 &&
             dns64_env->prefix_net != 64 && dns64_env->prefix_net != 96 ) {
-        log_err("dns64-prefix length it not 32, 40, 48, 56, 64 or 96: %s",
-                cfg->dns64_prefix);
+        log_err("dns64-prefix length is not 32, 40, 48, 56, 64 or 96: %s",
+                dns64_prefix);
         return 0;
     }
     for(s = cfg->dns64_ignore_aaaa; s; s = s->next) {
index 9829c8feb9a7b090e0263e2e83cccbf155445d51..45c076463a2852ade4fa72e1897761dc98a25389 100644 (file)
@@ -1,3 +1,6 @@
+4 November 2025: Wouter
+       - Fix dns64 log output to log the default instead of a null string.
+
 1 November 2025: Yorgos
        - Fix #1366: Infra cache does not work correctly for NAT64, by
          moving the NAT64 synthesis from the iterator when selecting a target