[PATCH] Net_DNS
| From: | Mark Reidenbach | Date: | Wed, 05 Jan 2005 00:00:17 +0000 |
| Subject: | [PATCH] Net_DNS | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-35340@lists.php.net to get a copy of this message | ||
The attached patch fixes bug ids 678, 1871, and 2141 as well as the
following fixes and improvements. Note that I did not touch the
send_tcp or send_udp_no_sock_lib functions and these paths may still
exhibit bugs with php5.
Can now query FQDNs that end in a dot (bug 678).
Works with php5 by not reassigning $this and using a variable to hold
the subclass instead (bug 1871).
Net_DNS_RR_MX will now return a result even if the preference is 0 (bug
2141).
Uses array_key_exists instead of checking to see if a non-existent key's
strlen is 0.
The Net_DNS_Resolver::send_udp_with_sock_lib function now sends the
query to all the resolvers
DNS servers and then checks to see if any answered. It also retries
until the timeout period
is reached or the retrans count is reached rather than returning after
the first unsuccessful attempt
(ported from PERL). Before these changes, only the first nameserver
was sent the query which resulted
in the function returning null if one of two servers were temporarily
down instead of the correct
response from the 2nd server if it was up.
Can now pass in an array to Net_DNS_Resolver to change the default
resolver options.
Net_DNS_Resolver::nextid works with register globals off
You can now set the nameservers to query using
Net_DNS_Resolver::nameservers().
This was not functioning before due to testing $ns when the function
parameter is $nsa.
You can now set nameservers using a FQDN instead of having to use ip
addresses. The FQDNs
are looked up using the system's default resolver. (This was ported
from PERL's Net::DNS
and was marked as needing to be ported in the function comments)
Net_DNS_Resolver::cname_addr() was ported from PERL and now returns the
address for A and CNAME
records. This is needed for Net_DNS_Resolver::nameservers() to
function properly.
A "." was added to "in-addr.arpa" in Net_DNS_Resolver::search() to match
PERL
Whitespace fixes.