author | Ben Chang <Benjamin.Chang@Oracle.COM> |
Wed, 12 Sep 2012 18:56:18 -0700 | |
changeset 974 | 615059399b5a |
parent 870 | b43099ca1080 |
permissions | -rw-r--r-- |
870
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
1 |
--- a/bin/named/controlconf.c Fri Jun 1 10:05:49 2012 |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
2 |
+++ b/bin/named/controlconf.c Tue Jun 5 17:27:55 2012 |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
3 |
@@ -371,12 +371,14 @@ |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
4 |
secret.rend = secret.rstart + key->secret.length; |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
5 |
result = isccc_cc_fromwire(&ccregion, &request, &secret); |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
6 |
if (result == ISC_R_SUCCESS) |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
7 |
break; |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
8 |
isc_mem_put(listener->mctx, secret.rstart, REGION_SIZE(secret)); |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
9 |
- log_invalid(&conn->ccmsg, result); |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
10 |
- goto cleanup; |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
11 |
+ if (result != ISCCC_R_BADAUTH) { |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
12 |
+ log_invalid(&conn->ccmsg, result); |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
13 |
+ goto cleanup; |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
14 |
+ } |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
15 |
} |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
16 |
|
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
17 |
if (key == NULL) { |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
18 |
log_invalid(&conn->ccmsg, ISCCC_R_BADAUTH); |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
19 |
goto cleanup; |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
20 |
--- a/lib/isccc/cc.c Wed Jun 6 01:41:54 2012 |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
21 |
+++ b/lib/isccc/cc.c Wed Jun 6 01:43:22 2012 |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
22 |
@@ -397,12 +397,10 @@ |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
23 |
if (first_tag && secret != NULL && strcmp(key, "_auth") == 0) |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
24 |
checksum_rstart = source->rstart; |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
25 |
first_tag = ISC_FALSE; |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
26 |
} |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
27 |
|
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
28 |
- *alistp = alist; |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
29 |
- |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
30 |
if (secret != NULL) { |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
31 |
if (checksum_rstart != NULL) |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
32 |
result = verify(alist, checksum_rstart, |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
33 |
(source->rend - checksum_rstart), |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
34 |
secret); |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
35 |
--- a/lib/isccc/cc.c Wed Jun 6 01:45:26 2012 |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
36 |
+++ b/lib/isccc/cc.c Wed Jun 6 01:43:22 2012 |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
37 |
@@ -408,11 +408,13 @@ |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
38 |
result = ISCCC_R_BADAUTH; |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
39 |
} else |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
40 |
result = ISC_R_SUCCESS; |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
41 |
|
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
42 |
bad: |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
43 |
- if (result != ISC_R_SUCCESS) |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
44 |
+ if (result == ISC_R_SUCCESS) |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
45 |
+ *alistp = alist; |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
46 |
+ else |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
47 |
isccc_sexpr_free(&alist); |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
48 |
|
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
49 |
return (result); |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
50 |
} |
b43099ca1080
7173752 Problem with network/dns
tomas.jedlicka <tomas.jedlicka@oracle.com>
parents:
diff
changeset
|
51 |