aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/DNS-LDNS/lib/DNS/LDNS
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2017-02-03 13:01:00 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2017-02-03 13:01:00 +0000
commitc6342fe2e90510d8d2296423f2ca92818a7b3d18 (patch)
tree0cc9064980c804a7bf5cc6d96c9249950c7e56a9 /contrib/DNS-LDNS/lib/DNS/LDNS
parent65be028f32ed37dce84f6328d4a7172132c8c224 (diff)
downloadsrc-vendor/ldns.tar.gz
src-vendor/ldns.zip
Notes
Notes: svn path=/vendor/ldns/dist/; revision=313156 svn path=/vendor/ldns/1.7.0/; revision=313157; tag=vendor/ldns/1.7.0
Diffstat (limited to 'contrib/DNS-LDNS/lib/DNS/LDNS')
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecDataChain.pm2
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecName.pm2
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRSets.pm2
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRs.pm2
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecTrustTree.pm2
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecZone.pm8
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/GC.pm2
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/Key.pm2
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/KeyList.pm2
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/Packet.pm2
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/RBNode.pm2
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/RBTree.pm2
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm2
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/RR.pm47
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/RRList.pm2
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/Resolver.pm2
-rw-r--r--contrib/DNS-LDNS/lib/DNS/LDNS/Zone.pm11
17 files changed, 53 insertions, 41 deletions
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecDataChain.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecDataChain.pm
index 42074dc153c8..28bebe044c0a 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecDataChain.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecDataChain.pm
@@ -6,7 +6,7 @@ use warnings;
use DNS::LDNS;
-our $VERSION = '0.06';
+our $VERSION = '0.52';
sub rrset {
my $self = shift;
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecName.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecName.pm
index bea6bb7c4931..0af91e2e4c32 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecName.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecName.pm
@@ -6,7 +6,7 @@ use warnings;
use DNS::LDNS ':all';
-our $VERSION = '0.06';
+our $VERSION = '0.52';
sub new {
my $class = shift;
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRSets.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRSets.pm
index fbd9bb735628..05471c7d1d6e 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRSets.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRSets.pm
@@ -6,7 +6,7 @@ use warnings;
use DNS::LDNS;
-our $VERSION = '0.06';
+our $VERSION = '0.52';
# Note: Since this class does not have a constructor, we can let its child
# objects be owned by the parent. This reduces the recursion depth on
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRs.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRs.pm
index b7b3dccf9543..78aa080c9c19 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRs.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecRRs.pm
@@ -6,7 +6,7 @@ use warnings;
use DNS::LDNS;
-our $VERSION = '0.06';
+our $VERSION = '0.52';
# Note: This class does not have a constructor. Thus, it can not be created
# as an individual object. The data structure of the node is owned
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecTrustTree.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecTrustTree.pm
index 1b9ca66e6102..cdd3ed846dd4 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecTrustTree.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecTrustTree.pm
@@ -6,7 +6,7 @@ use warnings;
use DNS::LDNS;
-our $VERSION = '0.06';
+our $VERSION = '0.52';
sub add_parent {
my ($self, $parent, $sig, $parent_status) = @_;
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecZone.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecZone.pm
index da809a6ace01..d273a00d2247 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecZone.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/DNSSecZone.pm
@@ -6,7 +6,7 @@ use warnings;
use DNS::LDNS ':all';
-our $VERSION = '0.06';
+our $VERSION = '0.52';
sub new {
my ($class, %args) = @_;
@@ -31,9 +31,9 @@ sub new {
if ($file) {
$zone = _new_from_file($file,
- $args{origin} || $LDNS::DEFAULT_ORIGIN,
- $args{ttl} || $LDNS::DEFAULT_TTL,
- $args{class} || $LDNS::DEFAULT_CLASS,
+ $args{origin},
+ $args{ttl} || 0,
+ $args{class} || 0,
$status, $line_nr);
}
else {
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/GC.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/GC.pm
index 014b7bee21af..e0d51e0d1ccd 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/GC.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/GC.pm
@@ -3,7 +3,7 @@ package DNS::LDNS::GC;
use strict;
use warnings;
-our $VERSION = '0.06';
+our $VERSION = '0.52';
my %ref_count;
my %owned_by;
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/Key.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/Key.pm
index bbce173dd8bb..f2fbb2e3e0ac 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/Key.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/Key.pm
@@ -6,7 +6,7 @@ use warnings;
use DNS::LDNS ':all';
-our $VERSION = '0.06';
+our $VERSION = '0.52';
sub new {
my ($class, %args) = @_;
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/KeyList.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/KeyList.pm
index c39e1c704e53..678225fd9a4c 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/KeyList.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/KeyList.pm
@@ -6,7 +6,7 @@ use warnings;
use DNS::LDNS ':all';
-our $VERSION = '0.06';
+our $VERSION = '0.52';
sub new {
my $class = shift;
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/Packet.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/Packet.pm
index f9875bf5abd0..c8d4ae2d4d9f 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/Packet.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/Packet.pm
@@ -6,7 +6,7 @@ use warnings;
use DNS::LDNS;
-our $VERSION = '0.06';
+our $VERSION = '0.52';
sub new {
my ($class, %args) = @_;
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/RBNode.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/RBNode.pm
index 31f617cddb1b..38adb385dfce 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/RBNode.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/RBNode.pm
@@ -6,7 +6,7 @@ use warnings;
use DNS::LDNS;
-our $VERSION = '0.06';
+our $VERSION = '0.52';
# Note: This class does not have a constructor. Thus, it can not be created
# as an individual object. The data structure of the object will always be
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/RBTree.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/RBTree.pm
index e86bfa8ddfa4..f64731a5b85c 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/RBTree.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/RBTree.pm
@@ -6,7 +6,7 @@ use warnings;
use DNS::LDNS;
-our $VERSION = '0.06';
+our $VERSION = '0.52';
# Note: Since this class does not have a constructor, we can let its child
# objects be owned by the parent. This reduces the recursion depth on
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm
index 76ef5ebac861..d495d3fbcf36 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/RData.pm
@@ -6,7 +6,7 @@ use warnings;
use DNS::LDNS;
-our $VERSION = '0.06';
+our $VERSION = '0.52';
sub new {
my ($class, $type, $str) = @_;
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/RR.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/RR.pm
index 91f34afb4028..70c919cd295a 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/RR.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/RR.pm
@@ -5,9 +5,8 @@ use strict;
use warnings;
use DNS::LDNS ':all';
-use Carp 'croak';
-our $VERSION = '0.06';
+our $VERSION = '0.52';
sub new {
my $class = shift;
@@ -19,17 +18,19 @@ sub new {
$rr = _new;
}
elsif (scalar(@_) == 1) {
- $rr = _new_from_str($_[0], $DNS::LDNS::DEFAULT_TTL,
- $DNS::LDNS::DEFAULT_ORIGIN, $status);
+ $rr = _new_from_str($_[0], 0,
+ undef, undef,
+ $status);
}
else {
my %args = @_;
if ($args{str}) {
$rr = _new_from_str($args{str},
- $args{default_ttl} || $DNS::LDNS::DEFAULT_TTL,
- $args{origin} || $DNS::LDNS::DEFAULT_ORIGIN,
- $status);
+ $args{default_ttl} || 0,
+ $args{origin},
+ $args{prev} ? ${$args{prev}} : undef,
+ $status);
}
elsif ($args{filename} or $args{file}) {
my $line_nr = 0;
@@ -43,10 +44,13 @@ sub new {
$file = \*FILE;
}
+ my $ttl = 0;
$rr = _new_from_file($file,
- $args{default_ttl} || $DNS::LDNS::DEFAULT_TTL,
- $args{origin} || $DNS::LDNS::DEFAULT_ORIGIN,
- $status, $line_nr);
+ $args{default_ttl} ? ${$args{default_ttl}} : $ttl,
+ $args{origin} ? ${$args{origin}} : undef,
+ $args{prev} ? ${$args{prev}} : undef,
+ $status,
+ $line_nr);
if ($args{filename}) {
close $file;
}
@@ -56,11 +60,11 @@ sub new {
elsif ($args{type}) {
$rr = _new_from_type($args{type});
if ($args{owner}) {
- $rr->set_owner(new DNS::LDNS::RData(
- &LDNS_RDF_TYPE_DNAME, $args{owner}));
+ $rr->set_owner(ref $args{owner} ? $args{owner} :
+ new DNS::LDNS::RData(&LDNS_RDF_TYPE_DNAME, $args{owner}));
}
- $rr->set_ttl($args{ttl} || $DNS::LDNS::DEFAULT_TTL);
- $rr->set_class($args{class} || $DNS::LDNS::DEFAULT_CLASS);
+ $rr->set_ttl($args{ttl}) if ($args{ttl});
+ $rr->set_class($args{class}) if ($args{class});
if ($args{rdata}) {
if (!$rr->set_rdata(@{$args{rdata}})) {
@@ -369,21 +373,26 @@ DNS::LDNS::RR - Resource record
my rr = new DNS::LDNS::RR('mylabel 3600 IN A 168.10.10.10')
my rr = new DNS::LDNS::RR(
str => 'mylabel 3600 IN A 168.10.10.10',
- default_ttl => 3600, # optional,
- origin => new DNS::LDNS::RData(LDNS_RDF_TYPE_NAME, 'myzone.'), " # optional
+ default_ttl => 3600, # optional
+ origin => $origin_rdata, # optional
+ prev => \$prev_rdata, # optional
)
my rr = new DNS::LDNS::RR(
filename => '/path/to/rr',
- origin => ...)
+ default_ttl => \$ttl, # optional
+ origin => \$origin_rdata, # optional
+ prev => \$prev_rdata) # optional
my rr = new DNS::LDNS::RR(
file => \*FILE,
- origin => ...)
+ default_ttl => \$ttl, # optional
+ origin => \$origin_rdata, # optional
+ prev => \$prev_rdata) # optional
my rr = new DNS::LDNS::RR(
type => LDNS_RR_TYPE_A,
rdata => [new DNS::LDNS::RData(...), new DNS::LDNS::RData(...), ...],
class => LDNS_RR_CLASS_IN, # optional
ttl => 3600, # optional
- owner => new DNS::LDNS::RData(LDNS_RDF_TYPE_NAME, 'mylabel'), # optional)
+ owner => new DNS::LDNS::RData(LDNS_RDF_TYPE_DNAME, 'mylabel'), # optional)
my rr = new DNS::LDNS::RR
rr2 = rr->clone
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/RRList.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/RRList.pm
index 11570acbcdde..7fdbd59db1dd 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/RRList.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/RRList.pm
@@ -6,7 +6,7 @@ use warnings;
use DNS::LDNS;
-our $VERSION = '0.06';
+our $VERSION = '0.52';
sub new {
my ($class, %args) = @_;
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/Resolver.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/Resolver.pm
index 111e64f0b7ec..fe4e10eff1cb 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/Resolver.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/Resolver.pm
@@ -6,7 +6,7 @@ use warnings;
use DNS::LDNS ':all';
-our $VERSION = '0.06';
+our $VERSION = '0.52';
sub new {
my ($class, %args) = @_;
diff --git a/contrib/DNS-LDNS/lib/DNS/LDNS/Zone.pm b/contrib/DNS-LDNS/lib/DNS/LDNS/Zone.pm
index a42beace7288..7f479275c418 100644
--- a/contrib/DNS-LDNS/lib/DNS/LDNS/Zone.pm
+++ b/contrib/DNS-LDNS/lib/DNS/LDNS/Zone.pm
@@ -6,7 +6,7 @@ use warnings;
use DNS::LDNS ':all';
-our $VERSION = '0.06';
+our $VERSION = '0.52';
sub new {
my ($class, %args) = @_;
@@ -25,12 +25,15 @@ sub new {
$file = \*FILE;
}
+ elsif ($args{file}) {
+ $file = $args{file};
+ }
if ($file) {
$zone = _new_from_file($file,
- $args{origin} || $DNS::LDNS::DEFAULT_ORIGIN,
- $args{default_ttl} || $DNS::LDNS::DEFAULT_TTL,
- $args{class} || $DNS::LDNS::DEFAULT_CLASS,
+ $args{origin},
+ $args{default_ttl} || 0,
+ $args{class} || 0,
$status, $line_nr);
}
else {