Revision history for Net::DNS
=============================
*** 0.35 May 26 2003
POD fixes, added tests for POD.
*** 0.34_03 May 22 2003
Reworked Makefile.PL to try and detect if you have a working C compiler.
Added '--pm' and '--xs' command line options to Makefile.PL
Fixed linking problem on linux.
Tie::DNSHash removed from the package, see Tie::DNS from CPAN for a more
complete implementation of a DNS hash.
*** 0.34_02 May 21 2003
Net::DNS::Packet::dn_expand is now implemented using the function of the
same name from libresolv. This method of decompressing names is around
twice as fast as the perl implementation.
Applied Jan Dubois's patch to fix nameserver lookup on Windows 2000/95/98/ME.
*** 0.34 6 Mar 2003
Applied David Carmean's patch for handling more than one string in a
TXT RR's RDATA section.
Applied Net::DNS::Resolver::Recurse bug fixes from Rob Brown.
Added check of the answer's rcode in Net::DNS::Resolver::axfr_next().
Applied Kenneth Olving <kenneth.olving@eoncompany.com> Windows changes.
Applied patch from Dan Sully (daniel@electricrain.com) allowing multiple
questions to be part of a DNS packet.
*** 0.33 8 Jan 2003
Fixed 00-load.t to skip the Net::DNS::SEC modules. The test suite
should now pass if you have Net::DNS::SEC installed.
Fixed the regular expression in RR.pm to comply with the RFCs, turns
out we were _too_ paranoid. [Olaf]
*** 0.32 5 Jan 2003
Various cleanups for perl 5.004. Thanks to nathan@anderson-net.com
([cpan #1847])
Applied Olaf's SIG patch (thanks as always).
Win32 now looks at the envirement variables when building the
configuration defaults. Thanks to net-dns-bug@oak-wood.co.uk
(That's the only name I have... [cpan #1819])
Added Rob Brown's Net::DNS::Resolver::Recurse module.
*** 0.31 17 Nov 2002
Applied Olaf's patch for an initialization bug in OPT.pm
Applied Rob Brown's patch for udp timeouts.
Added stuff from Rob Brown for making RPM creation easier.
Fixed a typo in FAQ.pod that was making aropos and whatis
grumpy. Thanks to Florian Hinzmann for pointing it out and a patch.
*** 0.30 7 Nov 2002
Applied Andrew Tridgell's (tridge@samba.org) patch for TKEY support.
Added Net::DNS::Packet->safe_push() to allow for automatically
checking for duplicate RRs being pushed into a packet. Inspired by Luis
Munoz.
Added more tests.
*** 0.29 2 Oct 2002
Fixed $_ from creaping out of scope in Resolver.pm. Thanks to
Ilya Martynov for finding the problem and the patch to fix it.
Fixed divide by zero bug there is no usable network interface(s).
Thanks to twilliams@tfcci.com, misiek@pld.ORG.PL (and one other
person that I can't seem to find the address of) for reports.
*** 0.28 20 Aug 2002
Fixed a bug in the new AUTOLOAD routines that made it impossible to set
attributes to '0'.
Fixed a bug in the RR pat that broke many updates.
*** 0.27 15 Aug 2002
Added (untested) support for perl 5.004.
We now allow whitespace at the begining of a RR.
Fixed an issue that gave Net::DNS::SEC problems, %Net::DNS::RR::RR is now
in a scope that the Net::DNS::SEC hook can see it from.
Fixed SRV records.
Fixed debug message in Net::DNS::Resolver::bgread().
*** 0.26 5 Aug 2002
Fixed various bugs in the test suite.
Fixed warning in Net::DNS::RR::AUTOLOAD with perl 5.005.
*** 0.25 1 Aug 2002
Implemented autoloading of the RR subclasses. This provides a good
sized speed bump, particually for applications that are not persisant.
Thanks to Benjamin Franz for a first version of this, and a lot of
inspiration.
Cleaned up a few things with CERT RRs.
Removed use of $' from RR.pm for effciency reasons. As a result, for
all RRs text following a ';' is considered a comment. This was
originally only done in RR/SOA.pm.
Added method caching to AUTOLOAD subroutines. This should provide a
modest speed bump.
The test suite has been greatly improved, though there is still more to
be done in this regard. Net::DNS now has the option to run online
tests, you'll need to be connected to the internet, with a
properly configured local recursive namserver, to run these.
*** 0.24 6 July 2002
Added support for DNAME resource records. Thanks to Andreas Gustafsson
for the implementation.
Fixed edge case for queries that have no name.
Tighted up the regular expression used in Net::DNS::Resolver::cname_addr()
*** 0.23 11 June 2002
Fixed Net::DNS::mx() to work properly in scalar context.
Fixed taint issue when Net::DNS::Resolver::nameservers() is passed
a hostname as an argument.
*** 0.22 6 June 2002
Fixed bug in DNS.pm causing TSIG to no longer function. This was due
to certain RR types being assigned the wrong number.
*** 0.21 3 June 2002
Net::DNS::RR::NSAP::new_from_string() is now implemented.
Thanks to Matts for a much faster implementation.
In complaince with RFC 1706, Net::DNS::RR::NSAP's print and string
methods no longer join data fields with '.'s.
Changed a good number of calls to Carp::croak from Carp::confess.
Fixed a bug in demo/check_soa that broke nameserver lookups in some
situations.
Fixed rr.t to run properly on older perls.
Added Olaf M. Kolkman's (olaf@ripe.net) hooks, allowing his DNSSEC
extension to be packaged seperatly.
Cleaned up a bug regarding bind() with older perls.
Net::DNS now works with 5.005_03 again.
*** 0.20 15 May 2002
Rewrote tests using Test::More. Future versions will have a more
extensive test suite.
Fixed bug in Net::DNS::RR::LOC in the precsize_valton() function
which caused out of range values for horizontal and vertical precision.
Changed documentation to reflect new website at
http://www.net-dns.org/
Updated the README to reflect changes in Net::DNS meta.
Fixed a few typos in the Changes document.
Merged the following changes from the developement version:
Added the persistent_tcp option to Net::DNS::Resolver to keep TCP
sockets open.
If Net::DNS is running under a SOCKSified Perl, it uses persistent
TCP sockets by default. There appear to be problems with SOCKS
without these settings. You can override these defaults by setting
$res->usevc(0) and $res->persistent_tcp(0).
Wrote the Net::DNS::Nameserver module for creating simple
nameservers. See the manual page for documentation and examples.
Fixed a bug in RR.pm that caused an incorrect Net::DNS::RR object to
be returned when creating it from a string that contained the root
(".") domain. Thanks to Rob Brown for pointing out the bug and
providing the patch (and apologies for taking so long to apply it).
Continuing to work on the TSIG code. Still finding bugs and
cleaning things up, so please use with caution and report any
problems.
Updated Net::DNS::RR::TSIG to force the class to ANY for
user-created RR objects (see RFC 2845 Section 2.3). Signed
transactions had been working against BIND 8 nameservers but were
failing against BIND 9 with FORMERR because BIND 9 enforces RFC 2845
more completely than BIND 8 (comment from Mark Andrews). Thanks to
George Michaelson for helping track this down.
Made sure all TSIG fields are set to a default value when creating a
TSIG record via Net::DNS::RR->new. Net::DNS had been printing nasty
warnings when the programmer tried to access fields such as
mac_length and mac before they had been calculated. Problem noted
by George Michaelson.
Added the Net::DNS::Resolver->tsig method to have the resolver
automatically sign all queries and updates with a TSIG record.
Updated the Net::DNS::Packet->sign_tsig method to accept a
Net::DNS::RR::TSIG object as an argument.
Added the Net::DNS::RR::TSIG->mac method to return the hex value of
the Message Authentication Code (MAC). The programmer must call a
packet's data method before this will return anything meaningful.
Added the Net::DNS::RR::TSIG->mac_size method to return the size of
the MAC. The programmer must call a packet's data method before
this will return anything meaningful.
Worked on a new version of Net::DNS::Resolver->axfr and made it a
front end for axfr_start and axfr_next. The old axfr method is
still available as axfr_old. Please report any problems.
Added some zone transfer tests to the private test suite. These
aren't distrubted with Net::DNS because they use test zones on a
private nameserver.
Have done more work cleaning up the TSIG code.
Fixed a bug that caused the name in a TSIG record to be compressed
when it shouldn't have been.
Documented the bug that the TSIG code ignores the upper 16 bits of
the time_signed and other_data fields, which are supposed to be
48-bit unsigned integers (RFC 2845, Sections 2.3 and 4.5.2).
Have done additional work on TSIG and provided more documentation.
See the Net::DNS::Packet, Net::DNS::Update, and Net::DNS::RR::TSIG
manual pages.
Added support for TSIG resource records (Net::DNS::RR::TSIG). See
the Net::DNS::Packet and Net::DNS::Update manual pages for examples
of making signed queries and dynamic updates. TSIG support is based
heavily on code contributed by Chris Turbeville.
Net::DNS now requires the Digest::MD5 and MIME::Base64 modules to
support TSIG records. The TODO list has an item to make these
modules optional for people who don't need them.
Updated Net::DNS::Packet->data to fix a bug that caused this method
to work only the first time it was called.
Updated DNS.pm to allow CHAOS as an alias for CH (CHAOS class).
Changed the tests to use the domain example.com.
Got rid of the 0.13bXX version numbers. Has probably always caused
things like "use Net::DNS 0.13" not to work. Aside from the version
number change, this version is nearly identical to Net::DNS 0.13b14.
Trimmed down Makefile.PL and added prerequisites to the
WriteMakefile call instead of checking for them manually. All
prerequisites are part of the Perl 5.6.0 distribution, but we'll
check for them anyway just to be sure they haven't been lost.
Version numbers are those distributed with Perl 5.6.0.
This version of Net::DNS requires Perl 5.6.0 or later.
Net::DNS should run under Win32 Perl now, though there are some
things to be aware of:
* I've had trouble getting UDP queries to work so TCP is the
default. This violates RFC 1123 Section 6.1.3.2.
* TCP Timeouts don't work.
Net::DNS::Resolver->res_init now has a check to see what OS we're
running under and calls res_init_unix or res_init_microsoft as
appropriate. Reading the resolver configuration from the Registry
was originally suggested by Petja van der Lek; thanks to Cricket Liu
for contributing the necessary code.
Added Net::DNS::Resolver->nameserver. This is just another name for
the nameservers method.
Added Net::DNS::Resolver->srcport to set the source port for queries
and zone transfers.
Added the Net::DNS::Resolver->srcaddr method to set the source
address for queries. This is convenient for forcing queries out a
specific interface on multi-homed hosts. Suggested by Peter Koch.
Added Net::DNS::Select as a front end to IO::Select. Does nothing
under Win32 Perl -- this allowed minimal rewrites to the code to
support Win32, which doesn't appear to implement select() properly.
Made sure all leading and trailing dots are stripped when adding a
name to an update or query packet. Problem noted by John M. Harres.
Made sure the recursion desired flag is set only for query packets.
RFC 2136 specifies that this part of the header should be
zero-filled in update packets.
Added a check to Net::DNS::Resolver->send_udp to distinguish between
a query timeout and failure on all nameservers.
Added Net::DNS::Resolver->axfr_start and
Net::DNS::Resolver->axfr_next. These methods provide a way to read a
zone transfer one record at a time. Net::DNS::Resolver->axfr may
eventually be a front end to these two methods.
Added code to dn_expand and dn_comp (Packet.pm) to handle embedded
dots in a label. Such characters are now returned as "\.";
hopefully this won't break anything. The code in dn_comp uses
negative lookbehind assertions, which were introduced in Perl 5.005.
Problem reported by Massimo Ianigro.
Changed Net::DNS::Resolver->send_udp to specify the destination in
$sock->send() instead of when calling IO::Socket::INET->new.
Specifying PeerAddr when creating the socket could cause the call to
hang under certain circumstances, such as when a PPP interface is
down. Problem noted by Ken Neighbors. Problem introducted by this
change: "connection refused" isn't returned.
Changed Net::DNS::Resolver::nextid to ensure its return value is 16
bits. Problem noted by David Lindes.
Modified demo/check_soa to print nameservers' IP addresses as
they're queried. Also added code to print the serial number a
nameserver has, even if it's not authoritative for the zone
(nameservers can go non-authoritative if the zone file has syntax
errors).
Added contrib/dnslookup.pl. Contributed by Kent Hamilton.
Changed the examples to use the reserved domain example.com,
reserved by RFC 2606 for this purpose. Long ago requested by one of
the hostmasters at gofast.net, which hosts the domain bar.com
(foo.com and bar.com had been used in many examples).
*** 0.14 21 Jan 2002
Net::DNS is in a state of flux. The module is now maintained by a group
of people including Mike Fuhr (the original developer) and others.
This is an interum release, intended to return Net::DNS to
CPAN, and encourage new devopement. Version 0.20 is not far behind
with major changes including support for windows platforms, TSIG
and Net::DNS::Nameserver (a very simple nameserver).
Fixed the "defined(@array) is deprecated" message in DNS.pm under perl
5.6.0 and greater.
Fixed a bug in the Net::DNS::Resolver->nextid method to ensure
that the query ID remains 16 bits.
*** 0.12 1 Oct 1997
Implemented TCP queries. UDP is still the default, but you can
make TCP the default by setting $res->usevc(1). If the response
to a UDP query has the truncated flag set ($query->header->tc),
the query will be retried using TCP; you can turn off this behavior
by setting $res->igntc(1). This has been on my TODO list for a
long time -- thanks to T.P. Brisco for inspiring me to finally add
it.
Added $res->tcp_timeout to set the timeout for TCP queries, including
zone transfers. Suggested by Stan Barber and finally added after
a question about timeouts from Jerzy Kedra.
Changed Net::DNS::Resolver->send to be a front-end to either send_udp
or send_tcp, as appropriate.
Added a check to Net::DNS::Resolver->send_udp to make sure the
socket objects really were created. Failure to make this check
was causing Net::DNS to die with errors like "Can't call method
'peerhost' without a package or object reference" or "Can't call
method 'fileno' without a package or object reference" if the socket
creation had failed. Problem noted by John Line, David Topper,
and Timothy Zakamaldin.
Changed some of the code in Resolver.pm to use IO::Select instead
of select(). Also changed one of the examples in DNS.pm to use
IO::Select.
Added "sub class" to RR.pm instead of using AUTOLOAD for it.
Apparently some versions of Perl, specifically the 5.003_07 release
included with some Linux distributions, would return the class an
object was blessed into instead of the RR's class. This fix should
work around the problem. Problem noted by John Line.
Added a check for a nameserver of "0" and convert it to "0.0.0.0".
Inspired in part by a report from David Mazieres.
Changed Net::DNS::Update->new to use the default domain if none
is specified. Inspired by a question from KrisJon Hanson.
Changed Net::DNS::Resolver->axfr to use the default domain if none
is specified.
In the documentation for Net::DNS::Resolver->bgread, mentioned that
the programmer should close or destroy the socket object after reading
from it. Suggested by Kouichirou Eto.
Removed an "srand" command from the Net::DNS::Resolver initialization
code. Decided it wasn't appropriate for the module to do.
Added the "-q" option to demo/axfr to make zone transfers quiet
(don't print the zone's resource records).
Wrote demo/mresolv as a demonstration of performing multiple
background queries simultaneously.
Replaced contrib/loc2earth.cgi with loc2earth.fcgi. Contributed by
Christopher Davis.
Added contrib/check_zone, a hacked version of demo/check_zone.
Contributed by Dennis Glatting.
Added contrib/DNSHash.pm, a module to implement DNS lookups as a
tied hash. Contributed by Dave Hayes.
Added contrib/dnswalk.README to mention Dave Barr's dnswalk, which
now uses Net::DNS.
*** 0.11 6 Jul 1997
Net::DNS::RR->new now allows the programmer to create RR objects
from text strings like "foo.com. 86400 IN A 172.16.1.2". See the
Net::DNS::RR manual page for examples.
Wrote the functions yxrrset, nxrrset, yxdomain, nxdomain, rr_add,
and rr_del as front-ends for creating RR objects in an update
packet. See the Net::DNS and Net::DNS::Update manual pages for
documentation and examples.
Changed Net::DNS::RR->AUTOLOAD to print a warning message and return
undef if the programmer calls an unknown method for an RR object.
Previous behavior died with an error message and a stack trace.
This error happens when the calling software assumes that an RR
object is of a particular type when it's actually of a different
type. THE CALLER SHOULD ALWAYS CHECK AN RR OBJECT'S TYPE BEFORE
CALLING ANY OF ITS METHODS! Personally, I think failure to do so
deserves a fatal error but I can appreciate that not everyone agrees
with me. Suggested by Dirk Herr-Hoyman.
Added the "answerfrom" and "answersize" methods to Net::DNS::Resolver
and Net::DNS::Packet.
Added the "mx" method to Net::DNS as a high-level function to return
the MX records for a specified name. This method will follow CNAME
references as long as there are MX records in the answer section
of the response packet (actually, it just ignores the CNAME records
and returns whatever MX records are present -- I'm not sure if this
is really correct). Modified demo/mx to use this new method.
Made the error message in Makefile.PL more descriptive.
Net::DNS::Resolver->axfr no longer returns the redundant SOA record
that terminates a zone transfer.
Finished the code for adding a LOC RR to a dynamic update packet.
Added loc2earth.cgi and loclist.pl to the contrib/ directory.
Contributed by Christopher Davis.
*** 0.10 12 Jun 1997
Added an index and some more information to README.
Documented the rdlength method and added the rdata method to the
Net::DNS::RR base class.
Added a check for packet size to Net::DNS::Resolver->send. Net::DNS
currently supports only UDP queries, which have a packet size limit of
512 octets (RFC 1035, Section 2.3.4).
Added lines to Net::DNS::Resolver->send to ignore any packets whose
query response code isn't set to 1, or whose query ID doesn't match
the one we sent in our request packet.
Added the "string" method to the Resolver, Packet, Header, and Question
classes.
Added code to Net::DNS::Question->new to check if the caller reversed
the type and class arguments. Inspired by a question from Robert Yoder.
Added support for dynamic updates (RFC 2136); see README and the
Net::DNS::Update manual page for more information and an example.
Here are some of the changes:
* Added the push method to the Net::DNS::Packet class.
* Wrote the Net::DNS::Update module as a front-end to Net::DNS::Packet
for creating dynamic update packets.
* Changed Net::DNS::RR->new to allow the programmer to create RR objects.
* Added test cases for creating RRs and pushing them into the
various packet sections.
* Changed Net::DNS::RR->AUTOLOAD to allow the programmer to change
the value of an RR's fields.
* Wrote Net::DNS::Packet->dn_comp to compress domain names (opposite
of dn_expand).
* Changed Net::DNS::Question->data to require a packet object and
an offset as arguments. We need this information to handle
compressed domain names.
* Added the rr_rdata method to RR subclasses to provide a binary
representation of the RRs RDATA section.
Added support for the following RR types:
AAAA
EID
MB
NIMLOC
NSAP
NULL
PX
Checked for the existence of $ENV{"HOME"} in Resolver.pm -- previous
behavior caused a "Use of uninitialized value" error to appear in
HTTP server log files if Net::DNS was being used in a CGI program
and HOME wasn't defined.
*** 0.09 29 May 1997
Net::DNS is now being developed under Perl 5.004. I'll try to keep
it compatible with earlier versions of Perl, at least for a while.
Got rid of an eval in RR.pm and replaced unpack with substr in
several places. After all other changes in this version, a simple
benchmark of a zone transfer showed the new code using about 25%
less CPU time than the old code. Mileage will vary based on the
program, of course, and programmers probably shouldn't expect to
see much improvement.
Debugging is now printed during packet parsing instead of after
the entire packet has been parsed. This can be useful for examining
corrupt packets.
Added support for NAPTR RRs. Thanks to Ryan Moats for contributing
the necessary code.
Wrote demo/axfr to demonstrate how to save a zone transfer to a
disk file and read it back later. Requires the Storable module.
BUG FIX: If no "nameserver" lines are found in the resolver config
files, queries should go to the nameserver running on the local
host. Previous behavior left the nameserver list empty, causing
all queries to fail with the error "no nameservers". Problem noted
by Dr Eberhard W Lisse.
BUG FIX: Added checks for missing data in packets - this should
eliminate the "@ outside of string" errors that can happen if the
packet is corrupt. In these cases, queries will return undef and an
explanation of the error (e.g., "answer section incomplete") will be
present in $res->errorstring. Problem noted by Martin Lichtin and
Stephen Hebditch.
*** 0.08 13 May 1997
Added support for LOC RRs. Thanks to Christopher Davis for his
help and contributing some of the code.
*** 0.07 19 Apr 1997
Added an empty DESTROY method to Header.pm, Question.pm, Resolver.pm,
and RR.pm. A couple of users have reported that Net::DNS dies because
AUTOLOAD gets called for DESTROY methods but doesn't handle them.
I haven't been able to reproduce this problem under Perl 5.003.
Changed Net::DNS::Resolver->nameservers to accept unqualified hostnames.
*** 0.06 2 Apr 1997
Fixed Net::DNS::Resolver->nameservers to accept CNAME RRs if the
corresponding A RR is found in the answer section. This should
eliminate some of the "address: no such method" errors that have
been reported.
Added the "string" method to Net::DNS::RR.
Added a more descriptive error to Net::DNS::RR::AUTOLOAD. This
error is printed if you call a method that doesn't exist for
a particular RR type.
*** 0.05 27 Mar 1997
Fixed Net::DNS::Resolver->nameservers to accept IP addresses. Was
accepting only names.
Fixed Net::DNS::Resolver->read_config() to ignore end-of-line comments
when reading resolver config files. Also fixed to recognize multiple
"nameserver" and "search" lines.
Fixed ISDN.pm to handle a non-existent sa field (sets it to an empty
string).
demo/check_zone now sets $res->defnames to false, so the domain name
given on the command line should be fully qualified.
Started adding code for dynamic updates. Not yet finished.
*** 0.04 13 Feb 1997
Added background queries. See the examples in the Net::DNS and
Net::DNS::Resolver manpages.
Added zone transfers and some error reporting to demo/perldig. Also
added the ability to query a specific nameserver.
Added a check to end zone transfers when we receive a second SOA RR
(would block waiting for more input when doing zone transfers from
certain nameservers). Also added some additional output if debugging
is turned on.
*** 0.03 8 Feb 1997
Added zone transfers. Wrote demo/check_zone. Minor corrections and
additions to the documentation.
*** 0.02 2 Feb 1997
Rewritten to be entirely Perl. No longer uses the system's resolver
library or the resparse library. Net::Resolver needs some work
on error reporting and needs to implement TCP queries.
*** 0.01 26 Jan 1997
Initial release for testing. Still some bugs, particularly in
memory management.
---
Chris Reinhardt <ctriv@net-dns.org>
Michael Fuhr <mfuhr@dimensional.com>
$Id: Changes,v 1.54 2003/05/26 06:53:54 ctriv Exp $