triaxx:
> postfix/postscreen[22945]: CONNECT from [A.B.C.D]:XXXXX to [E.F.G.H]:25
> postfix/dnsblog[22947]: panic: dns_query: bad length -1 (h_errno=Unknown
> error 0)
> ...
> The problem also occurs with 3.2.4. Since I can read this comment, I
> suppose a bug:
> /*
> * Future proofing. If this reaches the panic call, then some code change
> * introduced a bug.
> */
> if (len < 0)
> msg_panic("dns_query: bad length %d (h_errno=%s)",
> len, dns_strerror(h_errno));
This means that the FreeBSD library function res_query() has
changed, and that it now returns a negative result value (-1) while
leaving h_errno at zero (i.e. without specifying the error type).
Maybe this workaround will help. Sorry, no time for diffs. This is
for dns_res_search() in dns_lookup.c.
if (keep_notfound)
/* Prepare for returning a null-padded server reply. */
memset(answer, 0, anslen);
len = res_query(name, class, type, answer, anslen);
+ if (len < 0 && h_errno == 0) {
+ h_errno = HOST_NOT_FOUND;
+ msg_warn("res_query(%s, ...) returns -1 with h_errno==0", name);
+ }
if (len > 0) {
SET_H_ERRNO(0);
} else if (keep_notfound && NOT_FOUND_H_ERRNO(h_errno)) {
Wietse