]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnswriter: use uint for extended rcode
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 17 Apr 2018 13:45:25 +0000 (15:45 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 30 May 2018 08:00:52 +0000 (10:00 +0200)
pdns/dnswriter.cc
pdns/dnswriter.hh

index d788217e8c7cb4c5ab89bc19d3af702d18a79813..3b60a3ee9dca8ebe363493e3d7accd448eed438a 100644 (file)
@@ -94,7 +94,7 @@ void DNSPacketWriter::startRecord(const DNSName& name, uint16_t qtype, uint32_t
   d_sor=d_content.size(); // this will remind us where to stuff the record size
 }
 
-void DNSPacketWriter::addOpt(uint16_t udpsize, int extRCode, int Z, const vector<pair<uint16_t,string> >& options, uint8_t version)
+void DNSPacketWriter::addOpt(uint16_t udpsize, uint16_t extRCode, int Z, const vector<pair<uint16_t,string> >& options, uint8_t version)
 {
   uint32_t ttl=0;
 
index 64b1e35eaf14723670e77b6525195226b98e04fc..6e7317a93fb6e19347ae94575ec000f5fe56967c 100644 (file)
@@ -71,7 +71,7 @@ public:
 
   /** Shorthand way to add an Opt-record, for example for EDNS0 purposes */
   typedef vector<pair<uint16_t,std::string> > optvect_t;
-  void addOpt(uint16_t udpsize, int extRCode, int Z, const optvect_t& options=optvect_t(), uint8_t version=0);
+  void addOpt(uint16_t udpsize, uint16_t extRCode, int Z, const optvect_t& options=optvect_t(), uint8_t version=0);
 
   /** needs to be called after the last record is added, but can be called again and again later on. Is called internally by startRecord too.
       The content of the vector<> passed to the constructor is inconsistent until commit is called.