Link Here
|
1 |
--- dualserver.cpp.orig Mon Dec 12 10:41:03 2005 |
1 |
--- dualserver.cpp.orig Tue Apr 25 17:18:11 2006 |
2 |
+++ dualserver.cpp Mon Dec 12 10:43:53 2005 |
2 |
+++ dualserver.cpp Tue Apr 25 17:22:47 2006 |
3 |
@@ -349,8 +349,8 @@ |
3 |
@@ -463,8 +463,9 @@ |
4 |
else |
4 |
if (!req->rtype) |
5 |
{ |
5 |
{ |
6 |
req->dnsp.header.ancount = 0; |
6 |
req->dnsp.header.ancount = 0; |
7 |
- req->dnsp.header.rcode = 3; |
7 |
- req->dnsp.header.rcode = 3; |
8 |
- req->dnsp.header.ra = 0; |
8 |
- req->dnsp.header.ra = 0; |
9 |
+ req->dnsp.header.flags.rcode = 3; |
9 |
+ req->dnsp.header.flags.rcode = 3; |
10 |
+ req->dnsp.header.flags.ra = 0; |
10 |
+ req->dnsp.header.flags.ra = 0; |
|
|
11 |
+ |
11 |
} |
12 |
} |
12 |
|
13 |
|
13 |
if (cfig->servers[0]) |
14 |
if (cfig->servers[0]) |
14 |
@@ -364,8 +364,8 @@ |
15 |
@@ -478,8 +479,8 @@ |
15 |
req->dnsp.header.adcount = 0; |
16 |
req->dnsp.header.adcount = 0; |
16 |
} |
17 |
} |
17 |
|
18 |
|
18 |
- req->dnsp.header.qr = 1; |
19 |
- req->dnsp.header.qr = 1; |
19 |
- req->dnsp.header.aa = 1; |
20 |
- req->dnsp.header.aa = 1; |
20 |
+ req->dnsp.header.flags.qr = 1; |
21 |
+ req->dnsp.header.flags.qr = 1; |
21 |
+ req->dnsp.header.flags.aa = 1; |
22 |
+ req->dnsp.header.flags.aa = 1; |
22 |
|
23 |
|
23 |
char *raw = req->dnsp.data; |
24 |
char *raw = req->dnsp.data; |
24 |
|
25 |
|
25 |
@@ -495,7 +495,7 @@ |
26 |
@@ -649,7 +650,7 @@ |
26 |
if (!cfig->servers[0]) |
27 |
if (!cfig->dns[0]) |
27 |
glocal(cfig); |
28 |
getdnserv(cfig); |
28 |
|
29 |
|
29 |
- if (ntohs(req->dnsp.header.qdcount) == 1 && ntohs(req->dnsp.header.opcode) == 0) |
30 |
- if (ntohs(req->dnsp.header.qdcount) == 1 && ntohs(req->dnsp.header.opcode) == 0) |
30 |
+ if (ntohs(req->dnsp.header.qdcount) == 1 && ntohs(req->dnsp.header.flags.opcode) == 0) |
31 |
+ if (ntohs(req->dnsp.header.qdcount) == 1 && ntohs(req->dnsp.header.flags.opcode) == 0) |
31 |
{ |
32 |
{ |
32 |
char *raw = req->dnsp.data; |
33 |
char *raw = req->dnsp.data; |
33 |
strcpy(req->raw_query, raw); |
34 |
fQu(req->query, &req->dnsp, raw); |
34 |
@@ -619,7 +619,7 @@ |
35 |
@@ -853,7 +854,7 @@ |
35 |
|
36 |
|
36 |
WORD fdnmess(data5 *req, data2 *cfig) |
37 |
WORD fdnmess(data5 *req, data2 *cfig) |
37 |
{ |
38 |
{ |
38 |
- if (!req->dnsp.header.rd) |
39 |
- if (!req->dnsp.header.rd) |
39 |
+ if (!req->dnsp.header.flags.rd) |
40 |
+ if (!req->dnsp.header.flags.rd) |
40 |
return 0; |
41 |
return 0; |
41 |
|
42 |
|
42 |
if (!cfig->dns[0]) |
43 |
if (!cfig->dns[0]) |
43 |
@@ -679,10 +679,10 @@ |
44 |
@@ -922,11 +923,11 @@ |
|
|
45 |
} |
44 |
else |
46 |
else |
45 |
{ |
47 |
{ |
46 |
req->dnsp.header.ancount = 0; |
48 |
- req->dnsp.header.ancount = 0; |
47 |
- req->dnsp.header.rcode = 3; |
49 |
- req->dnsp.header.rcode = 3; |
48 |
- req->dnsp.header.ra = 0; |
50 |
- req->dnsp.header.ra = 0; |
49 |
- req->dnsp.header.qr = 1; |
51 |
- req->dnsp.header.qr = 1; |
50 |
- req->dnsp.header.aa = 0; |
52 |
- req->dnsp.header.aa = 0; |
51 |
+ req->dnsp.header.flags.rcode = 3; |
53 |
+ req->dnsp.header.ancount = 0; |
52 |
+ req->dnsp.header.flags.ra = 0; |
54 |
+ req->dnsp.header.flags.rcode = 3; |
53 |
+ req->dnsp.header.flags.qr = 1; |
55 |
+ req->dnsp.header.flags.ra = 0; |
54 |
+ req->dnsp.header.flags.aa = 0; |
56 |
+ req->dnsp.header.flags.qr = 1; |
55 |
req->BytesReady = req->BytesRecd; |
57 |
+ req->dnsp.header.flags.aa = 0; |
56 |
return 0; |
58 |
char *dp = req->dnsp.data; |
57 |
} |
59 |
dp += pQu(dp, req->query); |
58 |
@@ -754,7 +754,7 @@ |
60 |
dp += pShort(dp, DNS_TYPE_A); |
|
|
61 |
@@ -1106,7 +1107,7 @@ |
59 |
if (!found) |
62 |
if (!found) |
60 |
req->BytesReady = 0; |
63 |
req->bytes = 0; |
61 |
|
64 |
|
62 |
- req->dnsp.header.aa = 0; |
65 |
- req->dnsp.header.aa = 0; |
63 |
+ req->dnsp.header.flags.aa = 0; |
66 |
+ req->dnsp.header.flags.aa = 0; |
64 |
return req->BytesReady; |
67 |
return req->bytes; |
65 |
} |
68 |
} |
66 |
|
69 |
|