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

PowerDNS / pdns / 18903493638

29 Oct 2025 09:39AM UTC coverage: 73.004%. Remained the same
18903493638

Pull #16388

github

web-flow
Merge 1bddbd8fe into 82ea647b4
Pull Request #16388: gh actions build-packages: fix pattern for the download-artifacts action and publication issues

38272 of 63120 branches covered (60.63%)

Branch coverage included in aggregate %.

127434 of 163861 relevant lines covered (77.77%)

6052684.91 hits per line

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

100.0
/pdns/recursordist/sortlist.hh
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
#pragma once
23

24
#include "iputils.hh"
25
#include "dnsrecords.hh"
26

27
struct SortListOrder
28
{
29
  NetmaskTree<int> d_orders;
30
};
31

32
struct SortListOrderCmp
33
{
34
  SortListOrderCmp(SortListOrder slo) :
35
    d_slo(std::move(slo)) {}
1✔
36
  bool operator()(const DNSRecord& lhs, const DNSRecord& rhs) const;
37
  SortListOrder d_slo;
38
};
39

40
class SortList
41
{
42
public:
43
  void clear();
44
  void addEntry(const Netmask& covers, const Netmask& answermask, int order = -1);
45
  [[nodiscard]] int getMaxOrder(const Netmask& formask) const;
46
  [[nodiscard]] std::unique_ptr<SortListOrderCmp> getOrderCmp(const ComboAddress& who) const;
47
  [[nodiscard]] const NetmaskTree<SortListOrder>& getTree() const
48
  {
2✔
49
    return d_sortlist;
2✔
50
  }
2✔
51

52
private:
53
  NetmaskTree<SortListOrder> d_sortlist;
54
};
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