]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add missing period to generated IPv4 6to4 name
authorMark Andrews <marka@isc.org>
Wed, 5 Jun 2024 03:59:39 +0000 (13:59 +1000)
committerMark Andrews <marka@isc.org>
Thu, 1 Aug 2024 05:17:30 +0000 (15:17 +1000)
The period between the most significant nibble of the IPv4 address
and the 2.0.0.2.IP6.ARPA suffix was missing resulting in the wrong
name being checked.

lib/dns/ssu.c

index b54157ecc16b7746f5074c2fd31436f715565ed2..b43c7cfac38e401ca53eeb87ca4fb7c9fc7f9615 100644 (file)
@@ -245,13 +245,12 @@ stf_from_address(dns_name_t *stfself, const isc_netaddr_t *tcpaddr) {
        switch (tcpaddr->family) {
        case AF_INET:
                l = ntohl(tcpaddr->type.in.s_addr);
-               result = snprintf(buf, sizeof(buf),
-                                 "%lx.%lx.%lx.%lx.%lx.%lx.%lx.%lx"
-                                 "2.0.0.2.IP6.ARPA.",
-                                 l & 0xf, (l >> 4) & 0xf, (l >> 8) & 0xf,
-                                 (l >> 12) & 0xf, (l >> 16) & 0xf,
-                                 (l >> 20) & 0xf, (l >> 24) & 0xf,
-                                 (l >> 28) & 0xf);
+               result = snprintf(
+                       buf, sizeof(buf),
+                       "%lx.%lx.%lx.%lx.%lx.%lx.%lx.%lx.2.0.0.2.IP6.ARPA.",
+                       l & 0xf, (l >> 4) & 0xf, (l >> 8) & 0xf,
+                       (l >> 12) & 0xf, (l >> 16) & 0xf, (l >> 20) & 0xf,
+                       (l >> 24) & 0xf, (l >> 28) & 0xf);
                RUNTIME_CHECK(result < sizeof(buf));
                break;
        case AF_INET6: