Change max request id to 2^16
According to RFC 1035 Request id is a 16 bit unsigned number, not a signed short So change max request id to 65536
This commit is contained in:
parent
13413267dc
commit
d794d6e764
1 changed files with 1 additions and 1 deletions
|
@ -413,7 +413,7 @@ class DNSResolver(object):
|
||||||
|
|
||||||
def _send_req(self, hostname, qtype):
|
def _send_req(self, hostname, qtype):
|
||||||
self._request_id += 1
|
self._request_id += 1
|
||||||
if self._request_id > 32768:
|
if self._request_id > 65536:
|
||||||
self._request_id = 1
|
self._request_id = 1
|
||||||
req = build_request(hostname, qtype, self._request_id)
|
req = build_request(hostname, qtype, self._request_id)
|
||||||
for server in self._servers:
|
for server in self._servers:
|
||||||
|
|
Loading…
Reference in a new issue