From: Pieter Lexis Date: Tue, 17 Apr 2018 13:45:25 +0000 (+0200) Subject: dnswriter: use uint for extended rcode X-Git-Tag: dnsdist-1.3.1~50^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ed1d0ecd53a49edb636cc4bb0c45c1aa99973cb;p=pdns dnswriter: use uint for extended rcode --- diff --git a/pdns/dnswriter.cc b/pdns/dnswriter.cc index d788217e8..3b60a3ee9 100644 --- a/pdns/dnswriter.cc +++ b/pdns/dnswriter.cc @@ -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 >& options, uint8_t version) +void DNSPacketWriter::addOpt(uint16_t udpsize, uint16_t extRCode, int Z, const vector >& options, uint8_t version) { uint32_t ttl=0; diff --git a/pdns/dnswriter.hh b/pdns/dnswriter.hh index 64b1e35ea..6e7317a93 100644 --- a/pdns/dnswriter.hh +++ b/pdns/dnswriter.hh @@ -71,7 +71,7 @@ public: /** Shorthand way to add an Opt-record, for example for EDNS0 purposes */ typedef vector > 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.