]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Merge pull request #15054 from neheb/bb
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 3 Feb 2025 13:10:43 +0000 (14:10 +0100)
committerGitHub <noreply@github.com>
Mon, 3 Feb 2025 13:10:43 +0000 (14:10 +0100)
more clang-tidy fixups

1  2 
pdns/dnsbackend.hh
pdns/dnsdistdist/dnsdist-web.cc
pdns/lua-record.cc
pdns/ws-auth.cc

Simple merge
Simple merge
index f450cc0a0c5985f91821c35ba063cd48fc88e8e9,13b97f46b146724c5ac6644e9d3e0112e7dababd..36bfdccd0a843736485558e3d5a31cf68179657b
@@@ -1130,18 -1130,8 +1130,18 @@@ static void setupLuaRecords(LuaContext
          }
  
          string dashed=ip6.toString();
-         boost::replace_all(dashed, ":", "-");
+         std::replace(dashed.begin(), dashed.end(), ':', '-');
  
 +        // https://github.com/PowerDNS/pdns/issues/7524
 +        if (boost::ends_with(dashed, "-")) {
 +          // "a--a-" -> "a--a-0"
 +          dashed.push_back('0');
 +        }
 +        if (boost::starts_with(dashed, "-") || dashed.compare(2, 2, "--") == 0) {
 +          // "-a--a" -> "0-a--a"               "aa--a" -> "0aa--a"
 +          dashed.insert(0, "0");
 +        }
 +
          for(int i=31; i>=0; --i)
            fmt % labels[i];
          fmt % dashed;
diff --cc pdns/ws-auth.cc
Simple merge