• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PowerDNS / pdns / 18776176249

24 Oct 2025 09:51AM UTC coverage: 73.028% (+15.6%) from 57.383%
18776176249

Pull #16370

github

web-flow
Merge 0f309894e into 39f7f1b27
Pull Request #16370: auth: xfr churning

38273 of 63104 branches covered (60.65%)

Branch coverage included in aggregate %.

186 of 264 new or added lines in 1 file covered. (70.45%)

14471 existing lines in 217 files now uncovered.

127487 of 163878 relevant lines covered (77.79%)

5632363.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.67
/pdns/auth-caches.cc
1
/*
2
 * This file is part of PowerDNS or dnsdist.
3
 * Copyright -- PowerDNS.COM B.V. and its contributors
4
 *
5
 * This program is free software; you can redistribute it and/or modify
6
 * it under the terms of version 2 of the GNU General Public License as
7
 * published by the Free Software Foundation.
8
 *
9
 * In addition, for the avoidance of any doubt, permission is granted to
10
 * link this program with OpenSSL and to (re)distribute the binaries
11
 * produced as the result of such linking.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21
 */
22

23
#include "auth-caches.hh"
24
#include "auth-querycache.hh"
25
#include "auth-packetcache.hh"
26

27
extern AuthPacketCache PC;
28
extern AuthQueryCache QC;
29

30
/* empty all caches */
31
uint64_t purgeAuthCaches()
32
{
×
33
  uint64_t ret = 0;
×
34
  /* Clean query cache before packet cache to avoid potential race condition */
35
  ret += QC.purge();
×
36
  ret += PC.purge();
×
37
  return ret;
×
UNCOV
38
}
×
39

40
 /* remove specific entries from all caches, can be $ terminated */
41
uint64_t purgeAuthCaches(const std::string& match)
42
{
2,635✔
43
  uint64_t ret = 0;
2,635✔
44
  /* Clean query cache before packet cache to avoid potential race condition */
45
  ret += QC.purge(match);
2,635✔
46
  ret += PC.purge(match);
2,635✔
47
  return ret;
2,635✔
48
}
2,635✔
49

50
/* remove specific entries from all caches, no wildcard matching */
51
uint64_t purgeAuthCachesExact(const DNSName& qname)
52
{
220✔
53
  uint64_t ret = 0;
220✔
54
  /* Clean query cache before packet cache to avoid potential race condition */
55
  ret += QC.purgeExact(qname);
220✔
56
  ret += PC.purgeExact(qname);
220✔
57
  return ret;
220✔
58
}
220✔
59

60

61

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc