|
@@ -3,6 +3,7 @@
|
|
|
#include "egg_timer.h"
|
|
#include "egg_timer.h"
|
|
|
#include "main.h"
|
|
#include "main.h"
|
|
|
#include "net.h"
|
|
#include "net.h"
|
|
|
|
|
+#include "misc.h"
|
|
|
#include "socket.h"
|
|
#include "socket.h"
|
|
|
#include <netinet/in.h>
|
|
#include <netinet/in.h>
|
|
|
#include <sys/socket.h>
|
|
#include <sys/socket.h>
|
|
@@ -340,6 +341,7 @@ int egg_dns_lookup(const char *host, int timeout, dns_callback_t callback, void
|
|
|
|
|
|
|
|
cache_id = cache_find(host);
|
|
cache_id = cache_find(host);
|
|
|
if (cache_id >= 0) {
|
|
if (cache_id >= 0) {
|
|
|
|
|
+ shuffleArray(cache[cache_id].answer.list, cache[cache_id].answer.len);
|
|
|
callback(client_data, host, cache[cache_id].answer.list);
|
|
callback(client_data, host, cache[cache_id].answer.list);
|
|
|
return(-1);
|
|
return(-1);
|
|
|
}
|
|
}
|
|
@@ -391,6 +393,7 @@ int egg_dns_reverse(const char *ip, int timeout, dns_callback_t callback, void *
|
|
|
|
|
|
|
|
cache_id = cache_find(ip);
|
|
cache_id = cache_find(ip);
|
|
|
if (cache_id >= 0) {
|
|
if (cache_id >= 0) {
|
|
|
|
|
+ shuffleArray(cache[cache_id].answer.list, cache[cache_id].answer.len);
|
|
|
callback(client_data, ip, cache[cache_id].answer.list);
|
|
callback(client_data, ip, cache[cache_id].answer.list);
|
|
|
return(-1);
|
|
return(-1);
|
|
|
}
|
|
}
|