Package: policyd-weight / 0.1.15.2-12

10_replace_net_dns_dn_expand.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: replace Net::DNS::Packet::dn_expand with Net::DNS::DomainName::decode
Origin: James Cloos <cloos@jhcloos.com> 
Author: Werner Detter <werner@aloah-from-hell.de>
DEP: 3
Bug-Debian: http://bugs.debian.org/752845
--- a/policyd-weight
+++ b/policyd-weight
@@ -69,7 +69,6 @@
 use Sys::Syslog qw(:DEFAULT setlogsock);
 use Net::DNS;
 use Net::IP;
-use Net::DNS::Packet qw(dn_expand);
 use IO::Socket::INET;
 use IO::Socket::UNIX;
 use IO::Select;
@@ -3587,7 +3586,8 @@
             my    ($id, $bf, $qc, $anc, $nsc, $arc, $qb) = 
             unpack('n   n    n    n     n     n     a*', $buf);
 
-            my ($dn, $offset) = dn_expand(\$qb, 0);
+	    my ($decoded, $offset) = decode Net::DNS::DomainName(\$qb);
+            my $dn = $decoded->name;
 
             if(($id && $anc) && ($id == $oid) && ($query eq $dn))
             {