blob: bf5757b36c360948c83aa323b43cefd92e4035f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
--- polipo-1.0.4/dns.c.orig 2008-01-08 16:56:45.000000000 +0400
+++ polipo-1.0.4/dns.c 2010-03-29 18:28:43.225601510 +0500
@@ -1181,7 +1181,8 @@
} else
releaseAtom(value);
} else if(af == 0) {
- if(query->inet4 || query->inet6) {
+ if(query->inet4 && query->inet4->length ||
+ query->inet6 && query->inet6->length) {
do_log(L_WARN, "Host %s has both %s and CNAME -- "
"ignoring CNAME.\n", query->name->string,
query->inet4 ? "A" : "AAAA");
@@ -1207,7 +1208,8 @@
if(object->flags & OBJECT_INITIAL) {
assert(!object->headers);
if(cname) {
- assert(query->inet4 == NULL && query->inet6 == NULL);
+ assert(!(query->inet4 && query->inet4->length));
+ assert(!(query->inet6 && query->inet6->length));
object->headers = cname;
object->expires = current_time.tv_sec + ttl;
} else if((!query->inet4 || query->inet4->length == 0) &&
|