Debian Codegraph @

debian/old-patches/05-Fingerprint.pm-680077.patch

raw
1 Description: take care of missing Net::DNS::Header::data
2 Author: mainly: Duane Wessels dwessels at verisign.com
3 Index: net-dns-fingerprint/Fingerprint.pm
4 ===================================================================
5 --- net-dns-fingerprint.orig/lib/Net/DNS/Fingerprint.pm 2013-05-15 20:37:16.000000000 +0200
6 +++ net-dns-fingerprint/lib/Net/DNS/Fingerprint.pm 2013-05-15 21:04:28.000000000 +0200
7 @@ -632,11 +632,11 @@
8 return join(",", @list);
9 }
10
11 +
12 sub fp2header
13 {
14 my @list = split(/,/, shift);
15 -
16 - my $header = Net::DNS::Header->new;
17 + my $header = shift;
18
19 $header->qr(shift @list);
20 $header->opcode(shift @list);
21 @@ -651,8 +651,6 @@
22 $header->ancount(shift @list);
23 $header->nscount(shift @list);
24 $header->arcount(shift @list);
25 -
26 - return $header;
27 }
28
29 sub probe
30 @@ -664,9 +662,13 @@
31 my $qheader = shift;
32 my @qstring = split(/ /, shift);
33
34 - my $header = fp2header($qheader);
35 + #XXX original, now wrong: my $packet = Net::DNS::Packet->new(\$header->data);
36 + # next try obtained from:
37 + # https://lists.verisignlabs.com/pipermail/fpdns-user/2012-November/000026.html
38 + # does not work either: my $packet = Net::DNS::Packet->new(\$header->encode);
39 + my $packet = new Net::DNS::Packet;
40 + fp2header($qheader, $packet->header);
41
42 - my $packet = Net::DNS::Packet->new(\$header->data);
43 $packet->push("question", Net::DNS::Question->new(@qstring));
44
45 if ($self->{debug}) {