dnsruby 1.1 → 1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +3 -3
- data/lib/Dnsruby/Config.rb +3 -3
- data/lib/Dnsruby/DNS.rb +4 -2
- data/lib/Dnsruby/Resolver.rb +42 -38
- data/lib/Dnsruby/SingleResolver.rb +29 -21
- data/lib/Dnsruby/TheLog.rb +5 -21
- data/lib/Dnsruby/dnssec.rb +1 -1
- data/lib/Dnsruby/event_machine_interface.rb +23 -22
- data/lib/Dnsruby/message.rb +1 -1
- data/lib/Dnsruby/name.rb +1 -0
- data/lib/Dnsruby/resource/TKEY.rb +1 -1
- data/lib/Dnsruby/resource/TSIG.rb +8 -8
- data/lib/Dnsruby/select_thread.rb +19 -17
- data/lib/Dnsruby/zone_transfer.rb +6 -6
- data/lib/dnsruby.rb +10 -1
- data/test/tc_dns.rb +5 -1
- data/test/tc_event_machine_deferrable.rb +1 -1
- data/test/tc_event_machine_res.rb +1 -1
- data/test/tc_event_machine_single_res.rb +1 -1
- data/test/tc_event_machine_soak.rb +4 -4
- data/test/tc_res_opt.rb +4 -4
- data/test/tc_single_resolver.rb +1 -6
- data/test/tc_soak_base.rb +2 -2
- data/test/tc_tsig.rb +3 -3
- data/test/ts_offline.rb +1 -1
- data/test/ts_online.rb +1 -1
- metadata +2 -480
- data/doc/classes/Dnsruby/Algorithms.html +0 -171
- data/doc/classes/Dnsruby/Classes.html +0 -197
- data/doc/classes/Dnsruby/Classes.src/M000209.html +0 -23
- data/doc/classes/Dnsruby/Classes.src/M000210.html +0 -19
- data/doc/classes/Dnsruby/CodeMapper.html +0 -375
- data/doc/classes/Dnsruby/CodeMapper.src/M000186.html +0 -18
- data/doc/classes/Dnsruby/CodeMapper.src/M000187.html +0 -33
- data/doc/classes/Dnsruby/CodeMapper.src/M000188.html +0 -21
- data/doc/classes/Dnsruby/CodeMapper.src/M000189.html +0 -19
- data/doc/classes/Dnsruby/CodeMapper.src/M000190.html +0 -19
- data/doc/classes/Dnsruby/CodeMapper.src/M000191.html +0 -18
- data/doc/classes/Dnsruby/CodeMapper.src/M000192.html +0 -22
- data/doc/classes/Dnsruby/CodeMapper.src/M000193.html +0 -22
- data/doc/classes/Dnsruby/CodeMapper.src/M000194.html +0 -22
- data/doc/classes/Dnsruby/CodeMapper.src/M000195.html +0 -31
- data/doc/classes/Dnsruby/CodeMapper.src/M000196.html +0 -19
- data/doc/classes/Dnsruby/Config.html +0 -413
- data/doc/classes/Dnsruby/Config.src/M000148.html +0 -18
- data/doc/classes/Dnsruby/Config.src/M000149.html +0 -19
- data/doc/classes/Dnsruby/Config.src/M000150.html +0 -19
- data/doc/classes/Dnsruby/Config.src/M000151.html +0 -25
- data/doc/classes/Dnsruby/Config.src/M000152.html +0 -21
- data/doc/classes/Dnsruby/Config.src/M000153.html +0 -38
- data/doc/classes/Dnsruby/Config.src/M000154.html +0 -26
- data/doc/classes/Dnsruby/Config.src/M000155.html +0 -22
- data/doc/classes/Dnsruby/Config.src/M000156.html +0 -27
- data/doc/classes/Dnsruby/Config.src/M000157.html +0 -22
- data/doc/classes/Dnsruby/Config.src/M000158.html +0 -21
- data/doc/classes/Dnsruby/DNS.html +0 -571
- data/doc/classes/Dnsruby/DNS.src/M000258.html +0 -24
- data/doc/classes/Dnsruby/DNS.src/M000259.html +0 -18
- data/doc/classes/Dnsruby/DNS.src/M000260.html +0 -18
- data/doc/classes/Dnsruby/DNS.src/M000261.html +0 -20
- data/doc/classes/Dnsruby/DNS.src/M000262.html +0 -19
- data/doc/classes/Dnsruby/DNS.src/M000263.html +0 -20
- data/doc/classes/Dnsruby/DNS.src/M000264.html +0 -18
- data/doc/classes/Dnsruby/DNS.src/M000265.html +0 -19
- data/doc/classes/Dnsruby/DNS.src/M000266.html +0 -20
- data/doc/classes/Dnsruby/DNS.src/M000267.html +0 -28
- data/doc/classes/Dnsruby/DNS.src/M000268.html +0 -19
- data/doc/classes/Dnsruby/DNS.src/M000269.html +0 -20
- data/doc/classes/Dnsruby/DNS.src/M000270.html +0 -31
- data/doc/classes/Dnsruby/DecodeError.html +0 -120
- data/doc/classes/Dnsruby/Dnssec.html +0 -287
- data/doc/classes/Dnsruby/Dnssec.src/M000249.html +0 -23
- data/doc/classes/Dnsruby/Dnssec.src/M000250.html +0 -19
- data/doc/classes/Dnsruby/Dnssec.src/M000251.html +0 -90
- data/doc/classes/Dnsruby/Dnssec.src/M000252.html +0 -76
- data/doc/classes/Dnsruby/EncodeError.html +0 -120
- data/doc/classes/Dnsruby/FormErr.html +0 -119
- data/doc/classes/Dnsruby/Header.html +0 -501
- data/doc/classes/Dnsruby/Header.src/M000231.html +0 -35
- data/doc/classes/Dnsruby/Header.src/M000232.html +0 -18
- data/doc/classes/Dnsruby/Header.src/M000233.html +0 -18
- data/doc/classes/Dnsruby/Header.src/M000234.html +0 -21
- data/doc/classes/Dnsruby/Header.src/M000235.html +0 -20
- data/doc/classes/Dnsruby/Header.src/M000236.html +0 -32
- data/doc/classes/Dnsruby/Header.src/M000237.html +0 -27
- data/doc/classes/Dnsruby/Header.src/M000238.html +0 -26
- data/doc/classes/Dnsruby/Header.src/M000239.html +0 -47
- data/doc/classes/Dnsruby/Header.src/M000240.html +0 -28
- data/doc/classes/Dnsruby/Header.src/M000241.html +0 -30
- data/doc/classes/Dnsruby/Hosts.html +0 -316
- data/doc/classes/Dnsruby/Hosts.src/M000197.html +0 -20
- data/doc/classes/Dnsruby/Hosts.src/M000198.html +0 -19
- data/doc/classes/Dnsruby/Hosts.src/M000199.html +0 -20
- data/doc/classes/Dnsruby/Hosts.src/M000200.html +0 -21
- data/doc/classes/Dnsruby/Hosts.src/M000201.html +0 -19
- data/doc/classes/Dnsruby/Hosts.src/M000202.html +0 -20
- data/doc/classes/Dnsruby/Hosts.src/M000203.html +0 -21
- data/doc/classes/Dnsruby/IPv4.html +0 -233
- data/doc/classes/Dnsruby/IPv4.src/M000204.html +0 -32
- data/doc/classes/Dnsruby/IPv4.src/M000205.html +0 -19
- data/doc/classes/Dnsruby/IPv4.src/M000206.html +0 -18
- data/doc/classes/Dnsruby/IPv4.src/M000207.html +0 -18
- data/doc/classes/Dnsruby/IPv4.src/M000208.html +0 -18
- data/doc/classes/Dnsruby/IPv6.html +0 -281
- data/doc/classes/Dnsruby/IPv6.src/M000242.html +0 -60
- data/doc/classes/Dnsruby/IPv6.src/M000243.html +0 -22
- data/doc/classes/Dnsruby/IPv6.src/M000244.html +0 -20
- data/doc/classes/Dnsruby/IPv6.src/M000245.html +0 -18
- data/doc/classes/Dnsruby/Message/Section.html +0 -160
- data/doc/classes/Dnsruby/Message/Section.src/M000141.html +0 -29
- data/doc/classes/Dnsruby/Message/Section.src/M000142.html +0 -30
- data/doc/classes/Dnsruby/Message.html +0 -803
- data/doc/classes/Dnsruby/Message.src/M000119.html +0 -38
- data/doc/classes/Dnsruby/Message.src/M000120.html +0 -26
- data/doc/classes/Dnsruby/Message.src/M000121.html +0 -22
- data/doc/classes/Dnsruby/Message.src/M000122.html +0 -22
- data/doc/classes/Dnsruby/Message.src/M000123.html +0 -20
- data/doc/classes/Dnsruby/Message.src/M000124.html +0 -20
- data/doc/classes/Dnsruby/Message.src/M000125.html +0 -20
- data/doc/classes/Dnsruby/Message.src/M000126.html +0 -20
- data/doc/classes/Dnsruby/Message.src/M000127.html +0 -18
- data/doc/classes/Dnsruby/Message.src/M000128.html +0 -20
- data/doc/classes/Dnsruby/Message.src/M000129.html +0 -23
- data/doc/classes/Dnsruby/Message.src/M000130.html +0 -30
- data/doc/classes/Dnsruby/Message.src/M000131.html +0 -20
- data/doc/classes/Dnsruby/Message.src/M000132.html +0 -18
- data/doc/classes/Dnsruby/Message.src/M000133.html +0 -56
- data/doc/classes/Dnsruby/Message.src/M000134.html +0 -35
- data/doc/classes/Dnsruby/Message.src/M000135.html +0 -46
- data/doc/classes/Dnsruby/MetaTypes.html +0 -136
- data/doc/classes/Dnsruby/Modes.html +0 -171
- data/doc/classes/Dnsruby/NXDomain.html +0 -119
- data/doc/classes/Dnsruby/Name/Label.html +0 -300
- data/doc/classes/Dnsruby/Name/Label.src/M000110.html +0 -21
- data/doc/classes/Dnsruby/Name/Label.src/M000111.html +0 -18
- data/doc/classes/Dnsruby/Name/Label.src/M000112.html +0 -22
- data/doc/classes/Dnsruby/Name/Label.src/M000113.html +0 -18
- data/doc/classes/Dnsruby/Name/Label.src/M000114.html +0 -18
- data/doc/classes/Dnsruby/Name/Label.src/M000115.html +0 -18
- data/doc/classes/Dnsruby/Name/Label.src/M000116.html +0 -18
- data/doc/classes/Dnsruby/Name/Label.src/M000117.html +0 -18
- data/doc/classes/Dnsruby/Name/Label.src/M000118.html +0 -18
- data/doc/classes/Dnsruby/Name.html +0 -330
- data/doc/classes/Dnsruby/Name.src/M000104.html +0 -28
- data/doc/classes/Dnsruby/Name.src/M000105.html +0 -20
- data/doc/classes/Dnsruby/Name.src/M000106.html +0 -18
- data/doc/classes/Dnsruby/Name.src/M000107.html +0 -21
- data/doc/classes/Dnsruby/Name.src/M000108.html +0 -22
- data/doc/classes/Dnsruby/Name.src/M000109.html +0 -18
- data/doc/classes/Dnsruby/NotImp.html +0 -119
- data/doc/classes/Dnsruby/OpCode.html +0 -146
- data/doc/classes/Dnsruby/OtherResolvError.html +0 -119
- data/doc/classes/Dnsruby/QTypes.html +0 -146
- data/doc/classes/Dnsruby/Question.html +0 -301
- data/doc/classes/Dnsruby/Question.src/M000226.html +0 -47
- data/doc/classes/Dnsruby/Question.src/M000227.html +0 -18
- data/doc/classes/Dnsruby/Question.src/M000228.html +0 -18
- data/doc/classes/Dnsruby/Question.src/M000229.html +0 -32
- data/doc/classes/Dnsruby/Question.src/M000230.html +0 -18
- data/doc/classes/Dnsruby/RCode.html +0 -211
- data/doc/classes/Dnsruby/RR/ANY.html +0 -133
- data/doc/classes/Dnsruby/RR/CERT/CertificateTypes.html +0 -169
- data/doc/classes/Dnsruby/RR/CERT.html +0 -180
- data/doc/classes/Dnsruby/RR/CNAME.html +0 -151
- data/doc/classes/Dnsruby/RR/DNAME.html +0 -150
- data/doc/classes/Dnsruby/RR/DNSKEY.html +0 -422
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000044.html +0 -20
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000045.html +0 -21
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000046.html +0 -28
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000047.html +0 -22
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000048.html +0 -18
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000049.html +0 -22
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000050.html +0 -18
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000051.html +0 -26
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000052.html +0 -38
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000053.html +0 -45
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000054.html +0 -21
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000055.html +0 -24
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000056.html +0 -32
- data/doc/classes/Dnsruby/RR/DNSKEY.src/M000057.html +0 -24
- data/doc/classes/Dnsruby/RR/DS.html +0 -286
- data/doc/classes/Dnsruby/RR/DS.src/M000039.html +0 -22
- data/doc/classes/Dnsruby/RR/DS.src/M000040.html +0 -28
- data/doc/classes/Dnsruby/RR/DS.src/M000041.html +0 -24
- data/doc/classes/Dnsruby/RR/DS.src/M000042.html +0 -28
- data/doc/classes/Dnsruby/RR/DS.src/M000043.html +0 -36
- data/doc/classes/Dnsruby/RR/DomainName.html +0 -175
- data/doc/classes/Dnsruby/RR/DomainName.src/M000083.html +0 -18
- data/doc/classes/Dnsruby/RR/Generic.html +0 -133
- data/doc/classes/Dnsruby/RR/HINFO.html +0 -155
- data/doc/classes/Dnsruby/RR/IN/A.html +0 -200
- data/doc/classes/Dnsruby/RR/IN/A.src/M000017.html +0 -18
- data/doc/classes/Dnsruby/RR/IN/A.src/M000018.html +0 -18
- data/doc/classes/Dnsruby/RR/IN/A.src/M000019.html +0 -18
- data/doc/classes/Dnsruby/RR/IN/AAAA.html +0 -139
- data/doc/classes/Dnsruby/RR/IN/AFSDB.html +0 -145
- data/doc/classes/Dnsruby/RR/IN/PX.html +0 -143
- data/doc/classes/Dnsruby/RR/IN/SRV.html +0 -238
- data/doc/classes/Dnsruby/RR/IN/SRV.src/M000014.html +0 -29
- data/doc/classes/Dnsruby/RR/IN/SRV.src/M000015.html +0 -26
- data/doc/classes/Dnsruby/RR/IN/SRV.src/M000016.html +0 -22
- data/doc/classes/Dnsruby/RR/IN/WKS.html +0 -166
- data/doc/classes/Dnsruby/RR/IN/WKS.src/M000020.html +0 -20
- data/doc/classes/Dnsruby/RR/IN.html +0 -155
- data/doc/classes/Dnsruby/RR/ISDN.html +0 -155
- data/doc/classes/Dnsruby/RR/LOC.html +0 -395
- data/doc/classes/Dnsruby/RR/LOC.src/M000025.html +0 -32
- data/doc/classes/Dnsruby/RR/LOC.src/M000026.html +0 -23
- data/doc/classes/Dnsruby/RR/LOC.src/M000027.html +0 -25
- data/doc/classes/Dnsruby/RR/LOC.src/M000028.html +0 -21
- data/doc/classes/Dnsruby/RR/LOC.src/M000029.html +0 -20
- data/doc/classes/Dnsruby/RR/LOC.src/M000030.html +0 -23
- data/doc/classes/Dnsruby/RR/MB.html +0 -150
- data/doc/classes/Dnsruby/RR/MG.html +0 -150
- data/doc/classes/Dnsruby/RR/MINFO.html +0 -156
- data/doc/classes/Dnsruby/RR/MR.html +0 -150
- data/doc/classes/Dnsruby/RR/MX.html +0 -155
- data/doc/classes/Dnsruby/RR/NAPTR.html +0 -190
- data/doc/classes/Dnsruby/RR/NS.html +0 -151
- data/doc/classes/Dnsruby/RR/NSAP.html +0 -293
- data/doc/classes/Dnsruby/RR/NSAP.src/M000093.html +0 -19
- data/doc/classes/Dnsruby/RR/NSAP.src/M000094.html +0 -19
- data/doc/classes/Dnsruby/RR/NSAP.src/M000095.html +0 -22
- data/doc/classes/Dnsruby/RR/NSAP.src/M000096.html +0 -31
- data/doc/classes/Dnsruby/RR/NSEC.html +0 -301
- data/doc/classes/Dnsruby/RR/NSEC.src/M000031.html +0 -19
- data/doc/classes/Dnsruby/RR/NSEC.src/M000032.html +0 -18
- data/doc/classes/Dnsruby/RR/NSEC.src/M000033.html +0 -34
- data/doc/classes/Dnsruby/RR/NSEC.src/M000034.html +0 -18
- data/doc/classes/Dnsruby/RR/NSEC.src/M000035.html +0 -71
- data/doc/classes/Dnsruby/RR/NSEC.src/M000036.html +0 -18
- data/doc/classes/Dnsruby/RR/NSEC.src/M000037.html +0 -80
- data/doc/classes/Dnsruby/RR/NSEC.src/M000038.html +0 -23
- data/doc/classes/Dnsruby/RR/NSEC3.html +0 -366
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000085.html +0 -28
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000086.html +0 -18
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000087.html +0 -18
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000088.html +0 -22
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000089.html +0 -18
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000090.html +0 -21
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000091.html +0 -21
- data/doc/classes/Dnsruby/RR/NSEC3.src/M000092.html +0 -29
- data/doc/classes/Dnsruby/RR/NSEC3PARAM.html +0 -279
- data/doc/classes/Dnsruby/RR/NSEC3PARAM.src/M000077.html +0 -28
- data/doc/classes/Dnsruby/RR/NSEC3PARAM.src/M000078.html +0 -18
- data/doc/classes/Dnsruby/RR/NSEC3PARAM.src/M000079.html +0 -22
- data/doc/classes/Dnsruby/RR/NSEC3PARAM.src/M000080.html +0 -21
- data/doc/classes/Dnsruby/RR/NSEC3PARAM.src/M000081.html +0 -25
- data/doc/classes/Dnsruby/RR/PTR.html +0 -132
- data/doc/classes/Dnsruby/RR/RP.html +0 -183
- data/doc/classes/Dnsruby/RR/RP.src/M000082.html +0 -19
- data/doc/classes/Dnsruby/RR/RRSIG.html +0 -357
- data/doc/classes/Dnsruby/RR/RRSIG.src/M000097.html +0 -26
- data/doc/classes/Dnsruby/RR/RRSIG.src/M000098.html +0 -28
- data/doc/classes/Dnsruby/RR/RRSIG.src/M000099.html +0 -23
- data/doc/classes/Dnsruby/RR/RRSIG.src/M000100.html +0 -23
- data/doc/classes/Dnsruby/RR/RRSIG.src/M000101.html +0 -46
- data/doc/classes/Dnsruby/RR/RRSIG.src/M000102.html +0 -50
- data/doc/classes/Dnsruby/RR/RRSIG.src/M000103.html +0 -27
- data/doc/classes/Dnsruby/RR/RT.html +0 -155
- data/doc/classes/Dnsruby/RR/SOA.html +0 -233
- data/doc/classes/Dnsruby/RR/SOA.src/M000066.html +0 -24
- data/doc/classes/Dnsruby/RR/SOA.src/M000067.html +0 -27
- data/doc/classes/Dnsruby/RR/SPF.html +0 -138
- data/doc/classes/Dnsruby/RR/TKEY.html +0 -313
- data/doc/classes/Dnsruby/RR/TKEY.src/M000021.html +0 -19
- data/doc/classes/Dnsruby/RR/TKEY.src/M000022.html +0 -29
- data/doc/classes/Dnsruby/RR/TKEY.src/M000023.html +0 -21
- data/doc/classes/Dnsruby/RR/TKEY.src/M000024.html +0 -29
- data/doc/classes/Dnsruby/RR/TSIG.html +0 -524
- data/doc/classes/Dnsruby/RR/TSIG.src/M000068.html +0 -24
- data/doc/classes/Dnsruby/RR/TSIG.src/M000069.html +0 -32
- data/doc/classes/Dnsruby/RR/TSIG.src/M000070.html +0 -54
- data/doc/classes/Dnsruby/RR/TSIG.src/M000071.html +0 -121
- data/doc/classes/Dnsruby/RR/TSIG.src/M000072.html +0 -33
- data/doc/classes/Dnsruby/RR/TSIG.src/M000073.html +0 -25
- data/doc/classes/Dnsruby/RR/TSIG.src/M000074.html +0 -36
- data/doc/classes/Dnsruby/RR/TSIG.src/M000075.html +0 -22
- data/doc/classes/Dnsruby/RR/TSIG.src/M000076.html +0 -29
- data/doc/classes/Dnsruby/RR/TXT.html +0 -233
- data/doc/classes/Dnsruby/RR/TXT.src/M000061.html +0 -18
- data/doc/classes/Dnsruby/RR/TXT.src/M000062.html +0 -18
- data/doc/classes/Dnsruby/RR/TXT.src/M000063.html +0 -20
- data/doc/classes/Dnsruby/RR/TXT.src/M000064.html +0 -27
- data/doc/classes/Dnsruby/RR/TXT.src/M000065.html +0 -25
- data/doc/classes/Dnsruby/RR/X25.html +0 -203
- data/doc/classes/Dnsruby/RR/X25.src/M000058.html +0 -18
- data/doc/classes/Dnsruby/RR/X25.src/M000059.html +0 -18
- data/doc/classes/Dnsruby/RR/X25.src/M000060.html +0 -22
- data/doc/classes/Dnsruby/RR.html +0 -648
- data/doc/classes/Dnsruby/RR.src/M000001.html +0 -18
- data/doc/classes/Dnsruby/RR.src/M000002.html +0 -22
- data/doc/classes/Dnsruby/RR.src/M000003.html +0 -18
- data/doc/classes/Dnsruby/RR.src/M000004.html +0 -18
- data/doc/classes/Dnsruby/RR.src/M000005.html +0 -26
- data/doc/classes/Dnsruby/RR.src/M000006.html +0 -18
- data/doc/classes/Dnsruby/RR.src/M000007.html +0 -36
- data/doc/classes/Dnsruby/RR.src/M000008.html +0 -100
- data/doc/classes/Dnsruby/RR.src/M000009.html +0 -18
- data/doc/classes/Dnsruby/RR.src/M000010.html +0 -18
- data/doc/classes/Dnsruby/RR.src/M000011.html +0 -22
- data/doc/classes/Dnsruby/RR.src/M000012.html +0 -29
- data/doc/classes/Dnsruby/RR.src/M000013.html +0 -24
- data/doc/classes/Dnsruby/RRSet.html +0 -404
- data/doc/classes/Dnsruby/RRSet.src/M000211.html +0 -23
- data/doc/classes/Dnsruby/RRSet.src/M000212.html +0 -18
- data/doc/classes/Dnsruby/RRSet.src/M000213.html +0 -18
- data/doc/classes/Dnsruby/RRSet.src/M000214.html +0 -47
- data/doc/classes/Dnsruby/RRSet.src/M000215.html +0 -42
- data/doc/classes/Dnsruby/RRSet.src/M000216.html +0 -18
- data/doc/classes/Dnsruby/RRSet.src/M000217.html +0 -20
- data/doc/classes/Dnsruby/RRSet.src/M000218.html +0 -18
- data/doc/classes/Dnsruby/RRSet.src/M000219.html +0 -18
- data/doc/classes/Dnsruby/RRSet.src/M000220.html +0 -18
- data/doc/classes/Dnsruby/RRSet.src/M000221.html +0 -18
- data/doc/classes/Dnsruby/RRSet.src/M000222.html +0 -22
- data/doc/classes/Dnsruby/RRSet.src/M000223.html +0 -18
- data/doc/classes/Dnsruby/RRSet.src/M000224.html +0 -22
- data/doc/classes/Dnsruby/RRSet.src/M000225.html +0 -18
- data/doc/classes/Dnsruby/Refused.html +0 -119
- data/doc/classes/Dnsruby/Resolv.html +0 -401
- data/doc/classes/Dnsruby/Resolv.src/M000159.html +0 -18
- data/doc/classes/Dnsruby/Resolv.src/M000160.html +0 -18
- data/doc/classes/Dnsruby/Resolv.src/M000161.html +0 -18
- data/doc/classes/Dnsruby/Resolv.src/M000162.html +0 -18
- data/doc/classes/Dnsruby/Resolv.src/M000163.html +0 -18
- data/doc/classes/Dnsruby/Resolv.src/M000164.html +0 -18
- data/doc/classes/Dnsruby/Resolv.src/M000165.html +0 -18
- data/doc/classes/Dnsruby/Resolv.src/M000166.html +0 -19
- data/doc/classes/Dnsruby/Resolv.src/M000167.html +0 -20
- data/doc/classes/Dnsruby/Resolv.src/M000168.html +0 -29
- data/doc/classes/Dnsruby/Resolv.src/M000169.html +0 -19
- data/doc/classes/Dnsruby/Resolv.src/M000170.html +0 -20
- data/doc/classes/Dnsruby/Resolv.src/M000171.html +0 -25
- data/doc/classes/Dnsruby/ResolvError.html +0 -117
- data/doc/classes/Dnsruby/ResolvTimeout.html +0 -117
- data/doc/classes/Dnsruby/Resolver.html +0 -1055
- data/doc/classes/Dnsruby/Resolver.src/M000271.html +0 -21
- data/doc/classes/Dnsruby/Resolver.src/M000272.html +0 -27
- data/doc/classes/Dnsruby/Resolver.src/M000273.html +0 -28
- data/doc/classes/Dnsruby/Resolver.src/M000274.html +0 -18
- data/doc/classes/Dnsruby/Resolver.src/M000275.html +0 -51
- data/doc/classes/Dnsruby/Resolver.src/M000276.html +0 -21
- data/doc/classes/Dnsruby/Resolver.src/M000277.html +0 -22
- data/doc/classes/Dnsruby/Resolver.src/M000278.html +0 -18
- data/doc/classes/Dnsruby/Resolver.src/M000279.html +0 -20
- data/doc/classes/Dnsruby/Resolver.src/M000280.html +0 -19
- data/doc/classes/Dnsruby/Resolver.src/M000281.html +0 -19
- data/doc/classes/Dnsruby/Resolver.src/M000282.html +0 -19
- data/doc/classes/Dnsruby/Resolver.src/M000283.html +0 -19
- data/doc/classes/Dnsruby/Resolver.src/M000284.html +0 -19
- data/doc/classes/Dnsruby/Resolver.src/M000285.html +0 -19
- data/doc/classes/Dnsruby/Resolver.src/M000286.html +0 -19
- data/doc/classes/Dnsruby/Resolver.src/M000287.html +0 -19
- data/doc/classes/Dnsruby/Resolver.src/M000288.html +0 -19
- data/doc/classes/Dnsruby/Resolver.src/M000289.html +0 -19
- data/doc/classes/Dnsruby/Resolver.src/M000290.html +0 -19
- data/doc/classes/Dnsruby/Resolver.src/M000291.html +0 -19
- data/doc/classes/Dnsruby/Resolver.src/M000292.html +0 -26
- data/doc/classes/Dnsruby/Resolver.src/M000293.html +0 -18
- data/doc/classes/Dnsruby/Resolver.src/M000294.html +0 -23
- data/doc/classes/Dnsruby/Resolver.src/M000295.html +0 -18
- data/doc/classes/Dnsruby/ServFail.html +0 -119
- data/doc/classes/Dnsruby/SingleResolver.html +0 -674
- data/doc/classes/Dnsruby/SingleResolver.src/M000172.html +0 -18
- data/doc/classes/Dnsruby/SingleResolver.src/M000173.html +0 -24
- data/doc/classes/Dnsruby/SingleResolver.src/M000174.html +0 -36
- data/doc/classes/Dnsruby/SingleResolver.src/M000175.html +0 -18
- data/doc/classes/Dnsruby/SingleResolver.src/M000176.html +0 -19
- data/doc/classes/Dnsruby/SingleResolver.src/M000177.html +0 -50
- data/doc/classes/Dnsruby/SingleResolver.src/M000178.html +0 -19
- data/doc/classes/Dnsruby/SingleResolver.src/M000179.html +0 -21
- data/doc/classes/Dnsruby/SingleResolver.src/M000180.html +0 -25
- data/doc/classes/Dnsruby/SingleResolver.src/M000181.html +0 -54
- data/doc/classes/Dnsruby/SingleResolver.src/M000182.html +0 -27
- data/doc/classes/Dnsruby/SingleResolver.src/M000183.html +0 -27
- data/doc/classes/Dnsruby/SingleResolver.src/M000184.html +0 -35
- data/doc/classes/Dnsruby/SingleResolver.src/M000185.html +0 -21
- data/doc/classes/Dnsruby/TheLog.html +0 -196
- data/doc/classes/Dnsruby/TheLog.src/M000246.html +0 -20
- data/doc/classes/Dnsruby/TheLog.src/M000247.html +0 -20
- data/doc/classes/Dnsruby/TheLog.src/M000248.html +0 -20
- data/doc/classes/Dnsruby/Types.html +0 -436
- data/doc/classes/Dnsruby/Update.html +0 -368
- data/doc/classes/Dnsruby/Update.src/M000253.html +0 -32
- data/doc/classes/Dnsruby/Update.src/M000254.html +0 -36
- data/doc/classes/Dnsruby/Update.src/M000255.html +0 -32
- data/doc/classes/Dnsruby/Update.src/M000256.html +0 -41
- data/doc/classes/Dnsruby/Update.src/M000257.html +0 -34
- data/doc/classes/Dnsruby/VerifyError.html +0 -119
- data/doc/classes/Dnsruby/ZoneTransfer/Delta.html +0 -200
- data/doc/classes/Dnsruby/ZoneTransfer/Delta.src/M000146.html +0 -19
- data/doc/classes/Dnsruby/ZoneTransfer/Delta.src/M000147.html +0 -19
- data/doc/classes/Dnsruby/ZoneTransfer.html +0 -300
- data/doc/classes/Dnsruby/ZoneTransfer.src/M000143.html +0 -18
- data/doc/classes/Dnsruby/ZoneTransfer.src/M000144.html +0 -24
- data/doc/classes/Dnsruby/ZoneTransfer.src/M000145.html +0 -35
- data/doc/classes/Dnsruby.html +0 -463
- data/doc/created.rid +0 -1
- data/doc/files/lib/Dnsruby/Config_rb.html +0 -101
- data/doc/files/lib/Dnsruby/DNS_rb.html +0 -110
- data/doc/files/lib/Dnsruby/Hosts_rb.html +0 -108
- data/doc/files/lib/Dnsruby/Resolver_rb.html +0 -109
- data/doc/files/lib/Dnsruby/SingleResolver_rb.html +0 -108
- data/doc/files/lib/Dnsruby/TheLog_rb.html +0 -110
- data/doc/files/lib/Dnsruby/code_mapper_rb.html +0 -101
- data/doc/files/lib/Dnsruby/dnssec_rb.html +0 -107
- data/doc/files/lib/Dnsruby/event_machine_interface_rb.html +0 -108
- data/doc/files/lib/Dnsruby/ipv4_rb.html +0 -101
- data/doc/files/lib/Dnsruby/ipv6_rb.html +0 -101
- data/doc/files/lib/Dnsruby/message_rb.html +0 -109
- data/doc/files/lib/Dnsruby/name_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/AAAA_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/AFSDB_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/A_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/CERT_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/DNSKEY_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/DS_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/HINFO_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/IN_rb.html +0 -112
- data/doc/files/lib/Dnsruby/resource/ISDN_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/LOC_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/MINFO_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/MX_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/NAPTR_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/NSAP_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/NSEC3PARAM_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/NSEC3_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/NSEC_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/OPT_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/PX_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/RP_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/RRSIG_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/RT_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/SOA_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/SPF_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/SRV_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/TKEY_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/TSIG_rb.html +0 -114
- data/doc/files/lib/Dnsruby/resource/TXT_rb.html +0 -108
- data/doc/files/lib/Dnsruby/resource/X25_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/domain_name_rb.html +0 -101
- data/doc/files/lib/Dnsruby/resource/generic_rb.html +0 -131
- data/doc/files/lib/Dnsruby/resource/resource_rb.html +0 -110
- data/doc/files/lib/Dnsruby/select_thread_rb.html +0 -111
- data/doc/files/lib/Dnsruby/update_rb.html +0 -101
- data/doc/files/lib/Dnsruby/zone_transfer_rb.html +0 -101
- data/doc/files/lib/dnsruby_rb.html +0 -118
- data/doc/fr_class_index.html +0 -108
- data/doc/fr_file_index.html +0 -75
- data/doc/fr_method_index.html +0 -321
- data/doc/index.html +0 -24
data/README
CHANGED
@@ -10,8 +10,7 @@ resolv.rb Resolv API, but has been much extended to provide a
|
|
10
10
|
complete DNS implementation.
|
11
11
|
|
12
12
|
Dnsruby runs a single I/O thread to handle all concurrent
|
13
|
-
queries. It is
|
14
|
-
It is therefore suitable for high volume DNS applications.
|
13
|
+
queries. It is therefore suitable for high volume DNS applications.
|
15
14
|
|
16
15
|
The following is a (non-exhaustive) list of features :
|
17
16
|
|
@@ -47,7 +46,8 @@ Demo code
|
|
47
46
|
=========
|
48
47
|
|
49
48
|
The demo folder contains some example programs using Dnsruby.
|
50
|
-
These examples include
|
49
|
+
These examples include a basic dig tool (rubydig) and a tool to
|
50
|
+
concurrently resolve many names, amongst others.
|
51
51
|
|
52
52
|
Online tests
|
53
53
|
============
|
data/lib/Dnsruby/Config.rb
CHANGED
@@ -115,7 +115,7 @@ module Dnsruby
|
|
115
115
|
send("ndots=",nd)
|
116
116
|
send("domain=",dom)
|
117
117
|
}
|
118
|
-
|
118
|
+
Dnsruby.log.info{to_s}
|
119
119
|
end
|
120
120
|
|
121
121
|
# Set the default domain
|
@@ -195,7 +195,7 @@ module Dnsruby
|
|
195
195
|
# @nameserver = ['0.0.0.0'] if (@nameserver.class != Array || @nameserver.empty?)
|
196
196
|
# Now go through and ensure that all ns point to IP addresses, not domain names
|
197
197
|
@nameserver=ns
|
198
|
-
|
198
|
+
Dnsruby.log.debug{"Nameservers = #{@nameserver.join(", ")}"}
|
199
199
|
end
|
200
200
|
|
201
201
|
def Config.resolve_server(ns) #:nodoc: all
|
@@ -216,7 +216,7 @@ module Dnsruby
|
|
216
216
|
addr = TCPSocket.gethostbyname(ns)[3] # @TODO@ Replace this with Dnsruby call when lookups work
|
217
217
|
server = addr
|
218
218
|
rescue Exception => e
|
219
|
-
|
219
|
+
Dnsruby.log.error{"Can't make sense of nameserver : #{server}, exception : #{e}"}
|
220
220
|
raise ArgumentError.new("Can't make sense of nameserver : #{server}, exception : #{e}")
|
221
221
|
end
|
222
222
|
end
|
data/lib/Dnsruby/DNS.rb
CHANGED
@@ -175,6 +175,8 @@ module Dnsruby
|
|
175
175
|
case address
|
176
176
|
when Name
|
177
177
|
ptr = address
|
178
|
+
when IPv4, IPv6
|
179
|
+
ptr = address.to_name
|
178
180
|
when IPv4::Regex
|
179
181
|
ptr = IPv4.create(address).to_name
|
180
182
|
when IPv6::Regex
|
@@ -226,10 +228,10 @@ module Dnsruby
|
|
226
228
|
extract_resources(reply, reply_name, type, klass, &proc)
|
227
229
|
return
|
228
230
|
# when RCode::NXDomain
|
229
|
-
#
|
231
|
+
# Dnsruby.log.debug("RCode::NXDomain returned - raising error")
|
230
232
|
# raise Config::NXDomain.new(reply_name.to_s)
|
231
233
|
else
|
232
|
-
|
234
|
+
Dnsruby.log.error{"Unexpected rcode : #{reply.header.rcode.string}"}
|
233
235
|
raise Config::OtherResolvError.new(reply_name.to_s)
|
234
236
|
end
|
235
237
|
end
|
data/lib/Dnsruby/Resolver.rb
CHANGED
@@ -58,9 +58,9 @@ module Dnsruby
|
|
58
58
|
begin
|
59
59
|
require 'Dnsruby/event_machine_interface'
|
60
60
|
@@event_machine_available=true
|
61
|
-
|
61
|
+
Dnsruby.log.debug{"EventMachine loaded"}
|
62
62
|
rescue LoadError
|
63
|
-
|
63
|
+
Dnsruby.log.error{"EventMachine not found"}
|
64
64
|
end
|
65
65
|
DefaultQueryTimeout = 0
|
66
66
|
DefaultPacketTimeout = 10
|
@@ -161,11 +161,11 @@ module Dnsruby
|
|
161
161
|
# # ...
|
162
162
|
# end
|
163
163
|
def send_message(message)
|
164
|
-
|
164
|
+
Dnsruby.log.debug{"Resolver : sending message"}
|
165
165
|
q = Queue.new
|
166
166
|
send_async(message, q)
|
167
167
|
id, result, error = q.pop
|
168
|
-
|
168
|
+
Dnsruby.log.debug{"Resolver : result received"}
|
169
169
|
if (error != nil)
|
170
170
|
raise error
|
171
171
|
else
|
@@ -328,7 +328,7 @@ module Dnsruby
|
|
328
328
|
send(key.to_s+"=", args[0][key])
|
329
329
|
end
|
330
330
|
rescue Exception
|
331
|
-
|
331
|
+
Dnsruby.log.error{"Argument #{key} not valid\n"}
|
332
332
|
end
|
333
333
|
end
|
334
334
|
elsif (args[0].class == String)
|
@@ -349,7 +349,11 @@ module Dnsruby
|
|
349
349
|
def add_config_nameservers
|
350
350
|
# Add the Config nameservers
|
351
351
|
@config.nameserver.each do |ns|
|
352
|
-
@single_resolvers.push(SingleResolver.new({:server=>ns
|
352
|
+
@single_resolvers.push(SingleResolver.new({:server=>ns, :dnssec=>@dnssec,
|
353
|
+
:use_tcp=>@use_tcp, :packet_timeout=>@packet_timeout,
|
354
|
+
:tsig => @tsig, :ignore_truncation=>@ignore_truncation,
|
355
|
+
:src_address=>@src_address, :src_port=>@src_port,
|
356
|
+
:recurse=>@recurse, :udp_size=>@udp_size}))
|
353
357
|
end
|
354
358
|
end
|
355
359
|
|
@@ -497,9 +501,9 @@ module Dnsruby
|
|
497
501
|
end
|
498
502
|
@@use_eventmachine = on
|
499
503
|
if (on)
|
500
|
-
|
504
|
+
Dnsruby.log.info{"EventMachine will be used for IO"}
|
501
505
|
else
|
502
|
-
|
506
|
+
Dnsruby.log.info{"EventMachine will not be used for IO"}
|
503
507
|
end
|
504
508
|
end
|
505
509
|
#Check whether EventMachine will be used by Dnsruby
|
@@ -518,9 +522,9 @@ module Dnsruby
|
|
518
522
|
def Resolver.start_eventmachine_loop(on=true)
|
519
523
|
@@start_eventmachine_loop=on
|
520
524
|
if (on)
|
521
|
-
|
525
|
+
Dnsruby.log.info{"EventMachine loop will be started by Dnsruby"}
|
522
526
|
else
|
523
|
-
|
527
|
+
Dnsruby.log.info{"EventMachine loop will not be started by Dnsruby"}
|
524
528
|
end
|
525
529
|
end
|
526
530
|
#Checks whether Dnsruby will start the EventMachine loop when required.
|
@@ -545,7 +549,7 @@ module Dnsruby
|
|
545
549
|
timeouts[base+offset]=[res, retry_count]
|
546
550
|
else
|
547
551
|
if (timeouts.has_key?(base+retry_delay+offset))
|
548
|
-
|
552
|
+
Dnsruby.log.error{"Duplicate timeout key!"}
|
549
553
|
raise RuntimeError.new("Duplicate timeout key!")
|
550
554
|
end
|
551
555
|
timeouts[base+retry_delay+offset]=[res, retry_count]
|
@@ -601,13 +605,13 @@ module Dnsruby
|
|
601
605
|
df = nil
|
602
606
|
if (timeout == 0)
|
603
607
|
# Send immediately
|
604
|
-
|
608
|
+
Dnsruby.log.debug{"Sending first EM query"}
|
605
609
|
df = send_new_em_query(single_resolver, msg, client_queue, client_query_id, persistent_data)
|
606
610
|
persistent_data.outstanding.push(df)
|
607
611
|
else
|
608
612
|
# Send later
|
609
613
|
persistent_data.timer_procs[timeout]=Proc.new{
|
610
|
-
|
614
|
+
Dnsruby.log.debug{"Sending #{timeout} delayed EM query"}
|
611
615
|
df = send_new_em_query(single_resolver, msg, client_queue, client_query_id, persistent_data)
|
612
616
|
persistent_data.outstanding.push(df)
|
613
617
|
}
|
@@ -650,13 +654,13 @@ module Dnsruby
|
|
650
654
|
df = single_resolver.send_async(msg) # client_queue, client_query_id)
|
651
655
|
persistent_data.to_send-=1
|
652
656
|
df.callback { |answer|
|
653
|
-
|
657
|
+
Dnsruby.log.debug{"Response returned"}
|
654
658
|
persistent_data.outstanding.delete(df)
|
655
659
|
cancel_queries(persistent_data)
|
656
660
|
return_to_client(persistent_data.deferrable, client_queue, client_query_id, answer, nil)
|
657
661
|
}
|
658
662
|
df.errback { |response, error|
|
659
|
-
|
663
|
+
Dnsruby.log.debug{"Error #{error} returned"}
|
660
664
|
persistent_data.outstanding.delete(df)
|
661
665
|
if (response!="cancelling")
|
662
666
|
|
@@ -666,17 +670,17 @@ module Dnsruby
|
|
666
670
|
# - otherwise, continue
|
667
671
|
# Do we have any more packets to send to this resolver?
|
668
672
|
if (persistent_data.outstanding.empty? && persistent_data.to_send==0)
|
669
|
-
|
673
|
+
Dnsruby.log.debug{"Sending timeout to client"}
|
670
674
|
return_to_client(persistent_data.deferrable, client_queue, client_query_id, response, error)
|
671
675
|
end
|
672
676
|
elsif (error.kind_of?NXDomain)
|
673
677
|
# - if it was an NXDomain, then return that to the client, and stop all new queries (and clean up)
|
674
|
-
|
678
|
+
Dnsruby.log.debug{"NXDomain - returning to client"}
|
675
679
|
cancel_queries(persistent_data)
|
676
680
|
return_to_client(persistent_data.deferrable, client_queue, client_query_id, response, error)
|
677
681
|
elsif (error.kind_of?FormErr)
|
678
682
|
# - if it was a FormErr, then return that to the client, and stop all new queries (and clean up)
|
679
|
-
|
683
|
+
Dnsruby.log.debug{"FormErr - returning to client"}
|
680
684
|
cancel_queries(persistent_data)
|
681
685
|
return_to_client(persistent_data.deferrable, client_queue, client_query_id, response, error)
|
682
686
|
else
|
@@ -684,14 +688,14 @@ module Dnsruby
|
|
684
688
|
# If a Too Many Open Files error, then don't remove, but let retry work.
|
685
689
|
if (!(error.to_s=~/Errno::EMFILE/))
|
686
690
|
remove_server(single_resolver, persistent_data)
|
687
|
-
|
691
|
+
Dnsruby.log.debug{"Removing #{single_resolver.server} from resolver list for this query"}
|
688
692
|
else
|
689
|
-
|
693
|
+
Dnsruby.log.debug{"NOT Removing #{single_resolver.server} due to Errno::EMFILE"}
|
690
694
|
end
|
691
695
|
# - if it was the last server, then return an error to the client (and clean up)
|
692
696
|
if (persistent_data.outstanding.empty? && persistent_data.to_send==0)
|
693
697
|
# if (outstanding.empty?)
|
694
|
-
|
698
|
+
Dnsruby.log.debug{"Sending error to client"}
|
695
699
|
return_to_client(persistent_data.deferrable, client_queue, client_query_id, response, error)
|
696
700
|
end
|
697
701
|
end
|
@@ -712,7 +716,7 @@ module Dnsruby
|
|
712
716
|
end
|
713
717
|
|
714
718
|
def cancel_queries(persistent_data)
|
715
|
-
|
719
|
+
Dnsruby.log.debug{"Cancelling EM queries"}
|
716
720
|
persistent_data.outstanding.each do |df|
|
717
721
|
df.set_deferred_status :failed, "cancelling", "cancelling"
|
718
722
|
end
|
@@ -771,13 +775,13 @@ module Dnsruby
|
|
771
775
|
end
|
772
776
|
|
773
777
|
if (!client_queue.kind_of?Queue)
|
774
|
-
|
778
|
+
Dnsruby.log.error{"Wrong type for client_queue in Resolver#send_async"}
|
775
779
|
client_queue.push([client_query_id, ArgumentError.new("Wrong type of client_queue passed to Dnsruby::Resolver#send_async - should have been Queue, was #{client_queue.class}")])
|
776
780
|
return
|
777
781
|
end
|
778
782
|
|
779
783
|
if (!msg.kind_of?Message)
|
780
|
-
|
784
|
+
Dnsruby.log.error{"Wrong type for msg in Resolver#send_async"}
|
781
785
|
client_queue.push([client_query_id, ArgumentError.new("Wrong type of msg passed to Dnsruby::Resolver#send_async - should have been Message, was #{msg.class}")])
|
782
786
|
return
|
783
787
|
end
|
@@ -787,7 +791,7 @@ module Dnsruby
|
|
787
791
|
@mutex.synchronize{
|
788
792
|
tick_needed = true if @query_list.empty?
|
789
793
|
if (@query_list.has_key?client_query_id)
|
790
|
-
|
794
|
+
Dnsruby.log.error{"Duplicate query id requested (#{client_query_id}"}
|
791
795
|
client_queue.push([client_query_id, ArgumentError.new("Client query ID already in use")])
|
792
796
|
return
|
793
797
|
end
|
@@ -870,7 +874,7 @@ module Dnsruby
|
|
870
874
|
# Send the next query
|
871
875
|
res, retry_count = timeouts[timeout]
|
872
876
|
id = [res, msg, client_query_id, retry_count]
|
873
|
-
|
877
|
+
Dnsruby.log.debug{"Sending msg to #{res.server}"}
|
874
878
|
# We should keep a list of the queries which are outstanding
|
875
879
|
outstanding.push(id)
|
876
880
|
timeouts_done.push(timeout)
|
@@ -903,24 +907,24 @@ module Dnsruby
|
|
903
907
|
# @TODO@ Currently, tick and handle_queue_event called from select_thread - could have thread chuck events in to tick_queue. But then, clients would have to call in on other thread!
|
904
908
|
#
|
905
909
|
if (queue.empty?)
|
906
|
-
|
910
|
+
Dnsruby.log.fatal{"Queue empty in handle_queue_event!"}
|
907
911
|
raise RuntimeError.new("Severe internal error - Queue empty in handle_queue_event")
|
908
912
|
end
|
909
913
|
event_id, response, error = queue.pop
|
910
914
|
# We should remove this packet from the list of outstanding packets for this query
|
911
915
|
resolver, msg, client_query_id, retry_count = id
|
912
916
|
if (id != event_id)
|
913
|
-
|
917
|
+
Dnsruby.log.error{"Serious internal error!! #{id} expected, #{event_id} received"}
|
914
918
|
raise RuntimeError.new("Serious internal error!! #{id} expected, #{event_id} received")
|
915
919
|
end
|
916
920
|
@mutex.synchronize{
|
917
921
|
if (@query_list[client_query_id]==nil)
|
918
|
-
|
922
|
+
Dnsruby.log.debug{"Ignoring response for dead query"}
|
919
923
|
return
|
920
924
|
end
|
921
925
|
msg, client_queue, select_queue, outstanding = @query_list[client_query_id]
|
922
926
|
if (!outstanding.include?id)
|
923
|
-
|
927
|
+
Dnsruby.log.error{"Query id not on outstanding list! #{outstanding.length} items. #{id} not on #{outstanding}"}
|
924
928
|
raise RuntimeError.new("Query id not on outstanding!")
|
925
929
|
end
|
926
930
|
outstanding.delete(id)
|
@@ -931,14 +935,14 @@ module Dnsruby
|
|
931
935
|
else # if (event.kind_of?(Message))
|
932
936
|
handle_response(queue, event_id, response)
|
933
937
|
# else
|
934
|
-
#
|
938
|
+
# Dnsruby.log.error("Random object #{event.class} returned through queue to Resolver")
|
935
939
|
end
|
936
940
|
end
|
937
941
|
|
938
942
|
def handle_error_response(select_queue, query_id, error, response) #:nodoc: all
|
939
943
|
#Handle an error
|
940
944
|
@mutex.synchronize{
|
941
|
-
|
945
|
+
Dnsruby.log.debug{"handling error #{error.class}, #{error}"}
|
942
946
|
# Check what sort of error it was :
|
943
947
|
resolver, msg, client_query_id, retry_count = query_id
|
944
948
|
msg, client_queue, select_queue, outstanding = @query_list[client_query_id]
|
@@ -949,7 +953,7 @@ module Dnsruby
|
|
949
953
|
# Do we have any more packets to send to this resolver?
|
950
954
|
timeouts = @timeouts[client_query_id]
|
951
955
|
if (outstanding.empty? && timeouts[1].values.empty?)
|
952
|
-
|
956
|
+
Dnsruby.log.debug{"Sending timeout to client"}
|
953
957
|
send_result_and_close(client_queue, client_query_id, select_queue, response, error)
|
954
958
|
end
|
955
959
|
elsif (error.kind_of?NXDomain)
|
@@ -960,7 +964,7 @@ module Dnsruby
|
|
960
964
|
# If a Too Many Open Files error, then don't remove, but let retry work.
|
961
965
|
timeouts = @timeouts[client_query_id]
|
962
966
|
if (!(error.to_s=~/Errno::EMFILE/))
|
963
|
-
|
967
|
+
Dnsruby.log.debug{"Removing #{resolver.server} from resolver list for this query"}
|
964
968
|
timeouts[1].each do |key, value|
|
965
969
|
res = value[0]
|
966
970
|
if (res == resolver)
|
@@ -968,12 +972,12 @@ module Dnsruby
|
|
968
972
|
end
|
969
973
|
end
|
970
974
|
else
|
971
|
-
|
975
|
+
Dnsruby.log.debug{"NOT Removing #{resolver.server} due to Errno::EMFILE"}
|
972
976
|
end
|
973
977
|
# - if it was the last server, then return an error to the client (and clean up)
|
974
978
|
if (outstanding.empty? && timeouts[1].values.empty?)
|
975
979
|
# if (outstanding.empty?)
|
976
|
-
|
980
|
+
Dnsruby.log.debug{"Sending error to client"}
|
977
981
|
send_result_and_close(client_queue, client_query_id, select_queue, response, error)
|
978
982
|
end
|
979
983
|
end
|
@@ -984,12 +988,12 @@ module Dnsruby
|
|
984
988
|
|
985
989
|
def handle_response(select_queue, query_id, response) #:nodoc: all
|
986
990
|
# Handle a good response
|
987
|
-
|
991
|
+
Dnsruby.log.debug{"Handling good response"}
|
988
992
|
resolver, msg, client_query_id, retry_count = query_id
|
989
993
|
@mutex.synchronize{
|
990
994
|
query, client_queue, s_queue, outstanding = @query_list[client_query_id]
|
991
995
|
if (s_queue != select_queue)
|
992
|
-
|
996
|
+
Dnsruby.log.error{"Serious internal error : expected select queue #{s_queue}, got #{select_queue}"}
|
993
997
|
raise RuntimeError.new("Serious internal error : expected select queue #{s_queue}, got #{select_queue}")
|
994
998
|
end
|
995
999
|
send_result_and_close(client_queue, client_query_id, select_queue, response, nil)
|
@@ -129,7 +129,7 @@ module Dnsruby
|
|
129
129
|
tsig = RR.new_from_hash({:type => Types.TSIG, :klass => Classes.ANY, :name => args[0][0], :key => args[0][1]})
|
130
130
|
end
|
131
131
|
else
|
132
|
-
|
132
|
+
Dnsruby.log.info{"TSIG signing switched off"}
|
133
133
|
return nil
|
134
134
|
end
|
135
135
|
elsif (args.length ==2)
|
@@ -137,7 +137,7 @@ module Dnsruby
|
|
137
137
|
else
|
138
138
|
raise ArgumentError.new("Wrong number of arguments to tsig=")
|
139
139
|
end
|
140
|
-
|
140
|
+
Dnsruby.log.info{"TSIG signing now using #{tsig.name}, key=#{tsig.key}"}
|
141
141
|
return tsig
|
142
142
|
end
|
143
143
|
|
@@ -146,7 +146,7 @@ module Dnsruby
|
|
146
146
|
end
|
147
147
|
|
148
148
|
def server=(server)
|
149
|
-
|
149
|
+
Dnsruby.log.debug{"SingleResolver setting server to #{server}"}
|
150
150
|
@server=Config.resolve_server(server)
|
151
151
|
end
|
152
152
|
|
@@ -177,7 +177,9 @@ module Dnsruby
|
|
177
177
|
@recurse = true
|
178
178
|
@persistent_udp = false
|
179
179
|
@persistent_tcp = false
|
180
|
-
|
180
|
+
@dnssec = true
|
181
|
+
|
182
|
+
seen_dnssec = false
|
181
183
|
|
182
184
|
if (arg==nil)
|
183
185
|
# Get default config
|
@@ -189,12 +191,18 @@ module Dnsruby
|
|
189
191
|
arg.keys.each do |attr|
|
190
192
|
begin
|
191
193
|
send(attr.to_s+"=", arg[attr])
|
194
|
+
if (attr.to_s == "dnssec")
|
195
|
+
seen_dnssec = true
|
196
|
+
end
|
192
197
|
rescue Exception
|
193
|
-
|
198
|
+
Dnsruby.log.error{"Argument #{attr} not valid\n"}
|
194
199
|
end
|
195
|
-
|
200
|
+
# end
|
196
201
|
end
|
197
202
|
end
|
203
|
+
if (!seen_dnssec)
|
204
|
+
@dnssec = true
|
205
|
+
end
|
198
206
|
#Check server is IP
|
199
207
|
@server=Config.resolve_server(@server)
|
200
208
|
|
@@ -224,11 +232,11 @@ module Dnsruby
|
|
224
232
|
def send_message(msg, use_tcp=@use_tcp)
|
225
233
|
q = Queue.new
|
226
234
|
send_async(msg, q, Time.now + rand(1000000), use_tcp)
|
227
|
-
id,
|
235
|
+
id, reply, error = q.pop
|
228
236
|
if (error != nil)
|
229
237
|
raise error
|
230
238
|
else
|
231
|
-
return
|
239
|
+
return reply
|
232
240
|
end
|
233
241
|
end
|
234
242
|
|
@@ -287,7 +295,7 @@ module Dnsruby
|
|
287
295
|
end
|
288
296
|
query_packet = make_query_packet(msg, use_tcp)
|
289
297
|
if (udp_packet_size < query_packet.length)
|
290
|
-
|
298
|
+
Dnsruby.log.debug{"Query packet length exceeds max UDP packet size - using TCP"}
|
291
299
|
use_tcp = true
|
292
300
|
end
|
293
301
|
if (args.length > 1)
|
@@ -309,7 +317,7 @@ module Dnsruby
|
|
309
317
|
return send_eventmachine(query_packet, msg, client_query_id, client_queue, use_tcp)
|
310
318
|
else
|
311
319
|
if (!client_query_id)
|
312
|
-
client_query_id = Time.now + rand(10000)
|
320
|
+
client_query_id = Time.now + rand(10000) # is this safe?!
|
313
321
|
end
|
314
322
|
send_dnsruby(query_packet, msg, client_query_id, client_queue, use_tcp)
|
315
323
|
return client_query_id
|
@@ -327,7 +335,7 @@ module Dnsruby
|
|
327
335
|
ret = true
|
328
336
|
if (response.header.tc && !use_tcp && !@ignore_truncation)
|
329
337
|
# Try to resend over tcp
|
330
|
-
|
338
|
+
Dnsruby.log.debug{"Truncated - resending over TCP"}
|
331
339
|
send_eventmachine(msg_bytes, msg, client_query_id, client_queue, true, client_deferrable, packet_timeout - (Time.now-start_time))
|
332
340
|
else
|
333
341
|
if (!check_tsig(msg, response, response_bytes))
|
@@ -370,17 +378,17 @@ module Dnsruby
|
|
370
378
|
socket.close
|
371
379
|
end
|
372
380
|
err=IOError.new("dnsruby can't connect to #{@server}:#{@port} from #{@src_addr}:#{src_port}, use_tcp=#{use_tcp}, exception = #{e.class}, #{e}")
|
373
|
-
|
381
|
+
Dnsruby.log.error{"#{err}"}
|
374
382
|
st.push_exception_to_select(client_query_id, client_queue, err, nil) # @TODO Do we still need this? Can we not just send it from here?
|
375
383
|
return
|
376
384
|
end
|
377
385
|
if (socket==nil)
|
378
386
|
err=IOError.new("dnsruby can't connect to #{@server}:#{@port} from #{@src_addr}:#{src_port}, use_tcp=#{use_tcp}")
|
379
|
-
|
387
|
+
Dnsruby.log.error{"#{err}"}
|
380
388
|
st.push_exception_to_select(client_query_id, client_queue, err, nil) # @TODO Do we still need this? Can we not just send it from here?
|
381
389
|
return
|
382
390
|
end
|
383
|
-
|
391
|
+
Dnsruby.log.debug{"Sending packet to #{@server}:#{@port} from #{@src_addr}:#{src_port}, use_tcp=#{use_tcp}"}
|
384
392
|
begin
|
385
393
|
if (use_tcp)
|
386
394
|
lenmsg = [query_bytes.length].pack('n')
|
@@ -390,7 +398,7 @@ module Dnsruby
|
|
390
398
|
rescue Exception => e
|
391
399
|
socket.close
|
392
400
|
err=IOError.new("Send failed to #{@server}:#{@port} from #{@src_addr}:#{src_port}, use_tcp=#{use_tcp}, exception : #{e}")
|
393
|
-
|
401
|
+
Dnsruby.log.error{"#{err}"}
|
394
402
|
st.push_exception_to_select(client_query_id, client_queue, err, nil)
|
395
403
|
return
|
396
404
|
end
|
@@ -421,7 +429,7 @@ module Dnsruby
|
|
421
429
|
end
|
422
430
|
if (response.header.tc && !tcp)
|
423
431
|
# Try to resend over tcp
|
424
|
-
|
432
|
+
Dnsruby.log.debug{"Truncated - resending over TCP"}
|
425
433
|
send_async(query, client_queue, client_query_id, true)
|
426
434
|
return false
|
427
435
|
end
|
@@ -433,17 +441,17 @@ module Dnsruby
|
|
433
441
|
if (response.tsig)
|
434
442
|
if !query.tsig.verify(query, response, response_bytes)
|
435
443
|
# Discard packet and wait for correctly signed response
|
436
|
-
|
444
|
+
Dnsruby.log.error{"TSIG authentication failed!"}
|
437
445
|
return false
|
438
446
|
end
|
439
447
|
else
|
440
448
|
# Treated as having format error and discarded (RFC2845, 4.6)
|
441
|
-
|
449
|
+
Dnsruby.log.error{"Expecting TSIG signed response, but got unsigned response - discarding"}
|
442
450
|
return false
|
443
451
|
end
|
444
452
|
elsif (response.tsig)
|
445
453
|
# Error - signed response to unsigned query
|
446
|
-
|
454
|
+
Dnsruby.log.error{"Signed response to unsigned query"}
|
447
455
|
return false
|
448
456
|
end
|
449
457
|
return true
|
@@ -457,7 +465,7 @@ module Dnsruby
|
|
457
465
|
|
458
466
|
if (@dnssec)
|
459
467
|
# RFC 4035
|
460
|
-
|
468
|
+
Dnsruby.log.debug{";; Adding EDNS extention with UDP packetsize #{udp_packet_size} and DNS OK bit set\n"}
|
461
469
|
optrr = RR::OPT.new(udp_packet_size) # Decimal UDPpayload
|
462
470
|
optrr.dnssec_ok=true
|
463
471
|
|
@@ -469,7 +477,7 @@ module Dnsruby
|
|
469
477
|
|
470
478
|
elsif ((udp_packet_size > Resolver::DefaultUDPSize) && !use_tcp)
|
471
479
|
# if ((udp_packet_size > Resolver::DefaultUDPSize) && !use_tcp)
|
472
|
-
|
480
|
+
Dnsruby.log.debug{";; Adding EDNS extention with UDP packetsize #{udp_packet_size}.\n"}
|
473
481
|
# RFC 3225
|
474
482
|
optrr = RR::OPT.new(udp_packet_size)
|
475
483
|
|
data/lib/Dnsruby/TheLog.rb
CHANGED
@@ -17,7 +17,7 @@ require 'logger'
|
|
17
17
|
require 'singleton'
|
18
18
|
require 'thread'
|
19
19
|
module Dnsruby
|
20
|
-
#This
|
20
|
+
#This class exists for backwards compatibility.
|
21
21
|
#
|
22
22
|
#It's Logger (which defaults to STDOUT, level FATAL) can be configured, or a new Logger can be supplied.
|
23
23
|
#
|
@@ -25,36 +25,20 @@ module Dnsruby
|
|
25
25
|
# Dnsruby::TheLog.debug("Debug message")
|
26
26
|
#
|
27
27
|
class TheLog
|
28
|
-
include Singleton
|
29
|
-
def initialize() #:nodoc: all
|
30
|
-
@@mutex=Mutex.new
|
31
|
-
@@logger = Logger.new(STDOUT)
|
32
|
-
@@logger.level = Logger::FATAL
|
33
|
-
end
|
34
28
|
# Set a new Logger for use by Dnsruby
|
35
29
|
def set_logger(logger)
|
36
|
-
|
37
|
-
@@logger = logger
|
38
|
-
}
|
30
|
+
Dnsruby.log = logger
|
39
31
|
end
|
40
32
|
# Change the Logger level.
|
41
33
|
def level=(level)
|
42
|
-
|
43
|
-
@@logger.level = level
|
44
|
-
}
|
34
|
+
Dnsruby.log.level = level
|
45
35
|
end
|
46
36
|
def level
|
47
|
-
|
48
|
-
return @@logger.level
|
49
|
-
}
|
37
|
+
return Dnsruby.log.level
|
50
38
|
end
|
51
39
|
|
52
40
|
def self.method_missing(symbol, *args) #:nodoc: all
|
53
|
-
|
54
|
-
now = Time.now
|
55
|
-
@@logger.send(symbol, *args)
|
56
|
-
}
|
41
|
+
Dnsruby.log.send(symbol, *args)
|
57
42
|
end
|
58
|
-
log = TheLog.instance
|
59
43
|
end
|
60
44
|
end
|
data/lib/Dnsruby/dnssec.rb
CHANGED
@@ -313,7 +313,7 @@ module Dnsruby
|
|
313
313
|
#3.1.8.1. Signature Calculation
|
314
314
|
|
315
315
|
if (keyrec.sep_key? && !keyrec.zone_key?)
|
316
|
-
|
316
|
+
Dnsruby.log.error("DNSKEY with with SEP flag set and Zone Key flag not set was used to verify RRSIG over RRSET - this is not allowed by RFC4034 section 2.1.1")
|
317
317
|
return false
|
318
318
|
end
|
319
319
|
|