]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Remove comment functionality from ignore list file
authorEnsar Sarajčić <dev@ensarsarajcic.com>
Thu, 6 Jun 2024 07:31:14 +0000 (09:31 +0200)
committerEnsar Sarajčić <dev@ensarsarajcic.com>
Thu, 6 Jun 2024 07:31:22 +0000 (09:31 +0200)
This is done to keep the file as simple as possible.

pdns/recursordist/rec-main.cc

index 6781faff1b02ab2ff990207642d8f5adf1829ba7..18ada2b75e752e44b9d3be3d5a5a6e4ef68c4dd5 100644 (file)
@@ -877,15 +877,6 @@ static void parseIgnorelistFile(const std::string& fname, SuffixMatchNode& match
   }
 
   while (getline(ignorelistFileStream, line)) {
-    // strip everything after a #
-    string::size_type pos = line.find('#');
-    if (pos != string::npos) {
-      // make sure it's either first char or has whitespace before
-      if (pos == 0 || (std::isspace(line[pos - 1]) != 0)) {
-        line = line.substr(0, pos);
-      }
-    }
-
     boost::trim(line);
 
     matchNode.add(DNSName(line));