diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dns.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dns.cpp b/src/dns.cpp index 2a71f71df..d5c593e37 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -202,8 +202,9 @@ int DNSRequest::SendRequests(const DNSHeader *header, const int length, QueryTyp /* Add a query with a predefined header, and allocate an ID for it. */ DNSRequest* DNS::AddQuery(DNSHeader *header, int &id) { - id = this->currid++; - this->currid &= 0xFFFF; + timeval n; + gettimeofday(&n,NULL); + id = (n.tv_usec ^ getpid() ^ geteuid() ^ (currid++)) & 0xFFFF; DNSRequest* req = new DNSRequest(this->myserver); |