|
|
@@ -1,10 +1,50 @@
|
|
|
---- dnstracer.c.dist 2003-06-12 21:01:02.000000000 +0200
|
|
|
-+++ dnstracer.c 2003-06-12 21:10:38.000000000 +0200
|
|
|
-@@ -1246,7 +1246,11 @@
|
|
|
+--- dnstracer.c 2003-02-14 11:04:03.000000000 +0100
|
|
|
++++ dnstracer.c 2003-07-28 20:40:03.000000000 +0200
|
|
|
+@@ -603,7 +603,11 @@
|
|
|
+ get_resource(rr->type,session,rr->data,0));
|
|
|
+ }
|
|
|
+
|
|
|
++#ifdef NOIPV6
|
|
|
++void dump_data(struct sockaddr_in *dest4,void *dest6,struct dnssession *session) {
|
|
|
++#else
|
|
|
+ void dump_data(struct sockaddr_in *dest4,struct sockaddr_in6 *dest6,struct dnssession *session) {
|
|
|
++#endif
|
|
|
+ struct dnsrr *answerrr;
|
|
|
+ struct dnsrr *authorityrr;
|
|
|
+ struct dnsrr *additionalrr;
|
|
|
+@@ -719,6 +723,7 @@
|
|
|
+ exit(1);
|
|
|
+ }
|
|
|
+
|
|
|
++#if defined(AI_NUMERICHOST) && defined(EAI_NODATA)
|
|
|
+ if (global_source_address!=NULL) {
|
|
|
+ struct addrinfo hints,*src_res;
|
|
|
+ int error;
|
|
|
+@@ -745,6 +750,7 @@
|
|
|
+ exit(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
++#endif
|
|
|
+
|
|
|
+ return s;
|
|
|
+ }
|
|
|
+@@ -1084,7 +1090,11 @@
|
|
|
+ // don't have to worry about packets received from previous sessions.
|
|
|
+ //
|
|
|
+ session=(struct dnssession *)calloc(1,sizeof(struct dnssession));
|
|
|
++#ifdef NOIPV6
|
|
|
++ session->socket=create_socket(AF_INET);
|
|
|
++#else
|
|
|
+ session->socket=create_socket(ipv6?AF_INET6:AF_INET);
|
|
|
++#endif
|
|
|
+ session->ipv6=ipv6;
|
|
|
+ session->server=strdup(server_ip);
|
|
|
+ session->host=strdup(host);
|
|
|
+@@ -1246,7 +1256,11 @@
|
|
|
struct hostent *h;
|
|
|
char **addr_list=NULL;
|
|
|
|
|
|
-+#if defined(HAVE_GETHOSTBYNAME2)
|
|
|
++#ifndef NOIPV6
|
|
|
h=gethostbyname2(nextserver_name,ip==0?AF_INET:AF_INET6);
|
|
|
+#else
|
|
|
+ h=gethostbyname(nextserver_name);
|
|
|
@@ -12,11 +52,11 @@
|
|
|
if (h==NULL) continue;
|
|
|
|
|
|
//
|
|
|
-@@ -1480,8 +1484,12 @@
|
|
|
+@@ -1480,8 +1494,12 @@
|
|
|
|
|
|
{
|
|
|
struct hostent *h;
|
|
|
-+#if defined(HAVE_GETHOSTBYNAME2)
|
|
|
++#ifndef NOIPV6
|
|
|
if (((h=gethostbyname2(server_name,AF_INET6))==NULL) &&
|
|
|
((h=gethostbyname2(server_name,AF_INET))==NULL)) {
|
|
|
+#else
|