diff --git a/tdns/dnsmessages.cc b/tdns/dnsmessages.cc index 9dfac3d..7d33779 100644 --- a/tdns/dnsmessages.cc +++ b/tdns/dnsmessages.cc @@ -1,6 +1,5 @@ #include "dnsmessages.hh" #include "record-types.hh" -#include using namespace std; DNSMessageReader::DNSMessageReader(const char* in, uint16_t size) @@ -111,8 +110,7 @@ DNSMessageWriter::~DNSMessageWriter() = default; void DNSMessageWriter::randomizeID() { - if(getrandom(&dh.id, 2, 0) != 2) - throw std::runtime_error("No entropy"); + dh.id = random(); } void DNSMessageWriter::xfrName(const DNSName& name, bool compress) diff --git a/tdns/tdig.cc b/tdns/tdig.cc index f5749f1..17e4349 100644 --- a/tdns/tdig.cc +++ b/tdns/tdig.cc @@ -5,7 +5,6 @@ #include "sclasses.hh" #include #include -#include #include "record-types.hh" /*!