diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-04-21 15:08:10 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-04-21 15:08:10 +0200 |
commit | 4e58282058fe9d57f0ef1d557e88ffdbdbf01166 (patch) | |
tree | 4461481cd3c800c7111e4e6354279995143361fb /src/coremods | |
parent | 14d15d3d2a049b07e9cad2bc2970d1fa0d51af02 (diff) |
core_dns Add typedef for request id, change it to uint16_t
Diffstat (limited to 'src/coremods')
-rw-r--r-- | src/coremods/core_dns.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp index 58c275c7c..703dfdbdc 100644 --- a/src/coremods/core_dns.cpp +++ b/src/coremods/core_dns.cpp @@ -201,7 +201,7 @@ class Packet : public Query static const int HEADER_LENGTH = 12; /* ID for this packet */ - unsigned short id; + RequestId id; /* Flags on the packet */ unsigned short flags; @@ -219,9 +219,6 @@ class Packet : public Query this->id = (input[packet_pos] << 8) | input[packet_pos + 1]; packet_pos += 2; - if (this->id >= MAX_REQUEST_ID) - throw Exception("Query ID too large?"); - this->flags = (input[packet_pos] << 8) | input[packet_pos + 1]; packet_pos += 2; |