diff options
author | he <he@pkgsrc.org> | 2013-07-31 09:47:52 +0000 |
---|---|---|
committer | he <he@pkgsrc.org> | 2013-07-31 09:47:52 +0000 |
commit | 0e5b6d034ea3311ade44cea82f06c57570e1328a (patch) | |
tree | a1d3a6493b55665aa63847d775fe2c8fa488d42a /net | |
parent | 1f0c6d79d808234f06f1f3d571cdf67f6e17527b (diff) | |
download | pkgsrc-0e5b6d034ea3311ade44cea82f06c57570e1328a.tar.gz |
Add a patch allowing the caller to tweak the qdcount, ancount,
nscount and arcount header fields, so that fpdns can be allowed to
craft particular packets.
Diffstat (limited to 'net')
-rw-r--r-- | net/p5-Net-DNS/Makefile | 3 | ||||
-rw-r--r-- | net/p5-Net-DNS/distinfo | 3 | ||||
-rw-r--r-- | net/p5-Net-DNS/patches/patch-lib_Net_DNS_Header.pm | 84 |
3 files changed, 88 insertions, 2 deletions
diff --git a/net/p5-Net-DNS/Makefile b/net/p5-Net-DNS/Makefile index 93dd35bb6c0..2d431640308 100644 --- a/net/p5-Net-DNS/Makefile +++ b/net/p5-Net-DNS/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.51 2013/05/31 12:41:37 wiz Exp $ +# $NetBSD: Makefile,v 1.52 2013/07/31 09:47:52 he Exp $ DISTNAME= Net-DNS-0.69 +PKGREVISION= 1 PKGNAME= p5-${DISTNAME} PKGREVISION= 1 SVR4_PKGNAME= p5ndn diff --git a/net/p5-Net-DNS/distinfo b/net/p5-Net-DNS/distinfo index 1e8630b36b3..4990531986d 100644 --- a/net/p5-Net-DNS/distinfo +++ b/net/p5-Net-DNS/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.25 2012/12/06 13:09:04 wen Exp $ +$NetBSD: distinfo,v 1.26 2013/07/31 09:47:52 he Exp $ SHA1 (Net-DNS-0.69.tar.gz) = 2c84cdbd121b6b50bf9528fe8f474bf0915e85c6 RMD160 (Net-DNS-0.69.tar.gz) = cae86f2c9589f5bac0d93199a2563bc4d6a34b46 Size (Net-DNS-0.69.tar.gz) = 190234 bytes +SHA1 (patch-lib_Net_DNS_Header.pm) = 8f0873c90acfbfaccd12b3daef99e4a20cc90ee3 diff --git a/net/p5-Net-DNS/patches/patch-lib_Net_DNS_Header.pm b/net/p5-Net-DNS/patches/patch-lib_Net_DNS_Header.pm new file mode 100644 index 00000000000..21a92f973c0 --- /dev/null +++ b/net/p5-Net-DNS/patches/patch-lib_Net_DNS_Header.pm @@ -0,0 +1,84 @@ +$NetBSD: patch-lib_Net_DNS_Header.pm,v 1.1 2013/07/31 09:47:52 he Exp $ + +Make it possible to tweak the qdcount, ancount, nscount and arcount +header fields, so that fpdns can be allowed to craft particular packets. + +--- lib/Net/DNS/Header.pm.orig 2012-12-05 12:03:11.000000000 +0000 ++++ lib/Net/DNS/Header.pm +@@ -334,8 +334,9 @@ sub cd { + =head2 qdcount, zocount + + print "# of question records: ", $packet->header->qdcount, "\n"; ++ $packet->header->qdcount($n); + +-Gets the number of records in the question section of the packet. ++Gets or sets the number of records in the question section of the packet. + In dynamic update packets, this field is known as C<zocount> and refers + to the number of RRs in the zone section. + +@@ -347,15 +348,16 @@ sub qdcount { + my $self = shift; + my $xpkt = $self->{xbody}; + return $self->{count}[0] || scalar @{$xpkt->{question}} unless @_; +- carp 'header->qdcount attribute is read-only' unless $warned; ++ $self->{count}[0] = @_; + } + + + =head2 ancount, prcount + + print "# of answer records: ", $packet->header->ancount, "\n"; ++ $packet->header->ancount($n); + +-Gets the number of records in the answer section of the packet. ++Gets or sets the number of records in the answer section of the packet. + In dynamic update packets, this field is known as C<prcount> and refers + to the number of RRs in the prerequisite section. + +@@ -365,15 +367,16 @@ sub ancount { + my $self = shift; + my $xpkt = $self->{xbody}; + return $self->{count}[1] || scalar @{$xpkt->{answer}} unless @_; +- carp 'header->ancount attribute is read-only' unless $warned; ++ $self->{count}[1] = @_; + } + + + =head2 nscount, upcount + + print "# of authority records: ", $packet->header->nscount, "\n"; ++ $packet->header->nscount($n); + +-Gets the number of records in the authority section of the packet. ++Gets or sets the number of records in the authority section of the packet. + In dynamic update packets, this field is known as C<upcount> and refers + to the number of RRs in the update section. + +@@ -383,15 +386,16 @@ sub nscount { + my $self = shift; + my $xpkt = $self->{xbody}; + return $self->{count}[2] || scalar @{$xpkt->{authority}} unless @_; +- carp 'header->nscount attribute is read-only' unless $warned; ++ $self->{count}[2] = @_; + } + + + =head2 arcount, adcount + + print "# of additional records: ", $packet->header->arcount, "\n"; ++ $packet->header->arcount($n); + +-Gets the number of records in the additional section of the packet. ++Gets or sets the number of records in the additional section of the packet. + In dynamic update packets, this field is known as C<adcount>. + + =cut +@@ -400,7 +404,7 @@ sub arcount { + my $self = shift; + my $xpkt = $self->{xbody}; + return $self->{count}[3] || scalar @{$xpkt->{additional}} unless @_; +- carp 'header->arcount attribute is read-only' unless $warned; ++ $self->{count}[3] = @_; + } + + sub zocount { &qdcount; } |