>Number: 2058
>Category: general
>Synopsis: Wildcard VirtualHost address generates a reverse dns error
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Sat Apr 11 10:10:00 PDT 1998
>Last-Modified:
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: 1.2.6
>Environment:
FreeBSD 2.2.2-RELEASE
>Description:
When you specify a wildcard virtual host like <VirtualHost *:8080> the error:
'Failed to resolve server name for 0.0.0.0 (check DNS)' is reported, and the
hostname is set to 'bogus_host_without_reverse_dns:8080'
This is non critical, but is annoying as it isn't an error, INADDR_ANY isn't
supposed to resolve to anything useful. The hostname should really stay
as '*', but more importantly there shouldn't be an error.
>How-To-Repeat:
<VirtualHost *:8080>
</VirtualHost>
>Fix:
I have a simple patch I will paste below. If you have trouble with it, I can
mail it to you. There may be a better place for this check but this works for
me.
*** http_main.c Tue Feb 17 11:45:58 1998
--- http_main.c Sat Apr 11 03:20:40 1998
***************
*** 1597,1608 ****
} else {
/* again, what can we do? They didn't specify a
ServerName, and their DNS isn't working. -djg */
! if (s->addrs) {
fprintf(stderr, "Failed to resolve server name "
"for %s (check DNS)\n",
inet_ntoa(s->addrs->host_addr));
}
! s->server_hostname = "bogus_host_without_reverse_dns";
}
}
}
--- 1597,1612 ----
} else {
/* again, what can we do? They didn't specify a
ServerName, and their DNS isn't working. -djg */
! if (s->addrs && (s->addrs->host_addr.s_addr !=
htonl(INADDR_AN
Y))) {
fprintf(stderr, "Failed to resolve server name "
"for %s (check DNS)\n",
inet_ntoa(s->addrs->host_addr));
}
! if (s->addrs && (s->addrs->host_addr.s_addr ==
htonl(INADDR_AN
Y))) {
! s->server_hostname = "*";
! } else {
! s->server_hostname = "bogus_host_without_reverse_dns";
! }
}
}
}
%0
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]