]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Remove makeOpt from dnsrecords
authorFred Morcos <fred.morcos@open-xchange.com>
Wed, 15 Feb 2023 15:03:43 +0000 (16:03 +0100)
committerFred Morcos <fred.morcos@open-xchange.com>
Mon, 20 Feb 2023 10:22:48 +0000 (11:22 +0100)
pdns/dnsrecords.cc
pdns/dnsrecords.hh

index 80417bae6bfa8d255dbf72a9c37a7fe580925674..aab8577513e20955aed8e4740fd27096273f9a4b 100644 (file)
@@ -888,25 +888,6 @@ bool getEDNSOpts(const MOADNSParser& mdp, EDNSOpts* eo)
   return false;
 }
 
-DNSRecord makeOpt(const uint16_t udpsize, const uint16_t /* extRCode */, const uint16_t extFlags)
-{
-  EDNS0Record stuff;
-  stuff.extRCode=0;
-  stuff.version=0;
-  stuff.extFlags=htons(extFlags);
-  DNSRecord dr;
-  static_assert(sizeof(EDNS0Record) == sizeof(dr.d_ttl), "sizeof(EDNS0Record) must match sizeof(DNSRecord.d_ttl)");
-  memcpy(&dr.d_ttl, &stuff, sizeof(stuff));
-  dr.d_ttl=ntohl(dr.d_ttl);
-  dr.d_name=g_rootdnsname;
-  dr.d_type = QType::OPT;
-  dr.d_class=udpsize;
-  dr.d_place=DNSResourceRecord::ADDITIONAL;
-  dr.d_content = std::make_shared<OPTRecordContent>();
-  // if we ever do options, I think we stuff them into OPTRecordContent::data
-  return dr;
-}
-
 void reportBasicTypes()
 {
   ARecordContent::report();
index 19fa6eef5542f4973e81031ba362b49f5752de61..3974084b4e1b62a7bb2a682a5a4e684a9eeac0c2 100644 (file)
@@ -1055,7 +1055,6 @@ struct EDNSOpts
 
 class MOADNSParser;
 bool getEDNSOpts(const MOADNSParser& mdp, EDNSOpts* eo);
-DNSRecord makeOpt(const uint16_t udpsize, const uint16_t extRCode, const uint16_t extFlags);
 void reportBasicTypes();
 void reportOtherTypes();
 void reportAllTypes();