PR_GetHostByName was used to get PRHostEnt in htmladmin, but it
was called only when the first character of host was not digit.
The direct cause of the crash was the PRHostEnt variable to fill
in in PR_GetHostByName was not initialized, thus if the hostname
started with digit, the uninitialized, garbage address in the
variable was accessed, which crashed htmladmin.
This patch removes the hostname check and replaces PR_GetHostByName
with PR_GetAddrInfoByName to support IPv6 environment. Also, to
support numerical address, PR_StringToNetAddr is added before
Another cgi statpingserv has the same coding style. It is being
The previous fix (commit 325abca7135d06225adf5380d726de60dacda5a4)
for "Ticket #303 - make DNA range requests work with transactions"
introduced this dead code. Since dna_pre_op does not allocate
an entry "e", there is no need to check the flag "free_entry" and