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

PowerDNS / pdns / 25525160892

07 May 2026 09:33AM UTC coverage: 60.856% (-10.2%) from 71.057%
25525160892

push

github

web-flow
Merge pull request #17135 from rgacogne/ddist-also-set-udp-buffer-size-for-backend

dnsdist: Also apply UDP socket buffer sizes to backend sockets

35638 of 87562 branches covered (40.7%)

Branch coverage included in aggregate %.

0 of 65 new or added lines in 2 files covered. (0.0%)

14913 existing lines in 187 files now uncovered.

85585 of 111634 relevant lines covered (76.67%)

1199149.49 hits per line

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

86.67
/pdns/bindparserclasses.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
#include <string>
24
#include <map>
25
#include <vector>
26
#include <set>
27
#include <stdio.h>
28
#include <sys/stat.h>
29

30
#include "namespaces.hh"
31
#include "iputils.hh"
32

33
class BindDomainInfo 
34
{
35
public:
36
  void clear() 
11✔
37
  {
22✔
38
    name=ZoneName();
22✔
39
    filename=type="";
22✔
40
    primaries.clear();
22✔
41
    alsoNotify.clear();
22✔
42
    d_dev=0;
22✔
43
    d_ino=0;
22✔
44
  }
11✔
45
  ZoneName name;
46
  string viewName;
47
  string filename;
48
  vector<ComboAddress> primaries;
49
  set<string> alsoNotify;
50
  string type;
51
  bool hadFileDirective{false};
52

53
  dev_t d_dev{0};
54
  ino_t d_ino{0};
55

56
  bool operator<(const BindDomainInfo& b) const
UNCOV
57
  {
×
UNCOV
58
    return pair(d_dev, d_ino) < pair(b.d_dev, b.d_ino);
×
59
  }
60
};
61

62
extern const char *bind_directory;
63
extern FILE *yyin;
64
class BindParser
65
{
66
 public:
67
   BindParser()
1✔
68
   {
2✔
69
     yyin = 0;
2✔
70
     extern int include_stack_ptr;
2✔
71
     include_stack_ptr = 0;
1✔
72

1✔
73
     bind_directory = d_dir.c_str();
2✔
74
   }
1✔
75
  ~BindParser()
1✔
76
  {
2!
77
    if(yyin) {
2!
78
      fclose(yyin);
2✔
79
      yyin=0;
2✔
80
    }
2✔
81
  }
1✔
82
  void parse(const string &fname);
83
  void commit(BindDomainInfo DI);
84
  void setDirectory(const string &dir);
85
  const string &getDirectory();
86
  const vector<BindDomainInfo>& getDomains();
87
  void setVerbose(bool verbose);
88
  void addAlsoNotify(const string &host);
89
  set<string> & getAlsoNotify() { return this->alsoNotify; } 
90
private:
91
  string d_dir{"."};
92
  set<string> alsoNotify;
93
  vector<BindDomainInfo> d_zonedomains;
94
  bool d_verbose{false};
95
};
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

© 2026 Coveralls, Inc