Commit Graph

553 Commits

Author SHA1 Message Date
Miek Gieben ba6c414fe4 Return an error when packStruct fails
When doing the recursion be sure to catch the error that
might be generated.

Reported-by: madotsuki
2013-03-18 17:56:48 +00:00
Miek Gieben 99d23ee4a7 docs 2013-03-01 09:12:43 +01:00
Miek Gieben ed28992106 Merge branch 'master' of github.com:miekg/dns 2013-02-09 08:36:28 +01:00
Miek Gieben cd10853288 Make Len() and Copy() private
I don't think anybody will needs these, msg.Len() is still
available. Severly cuts back on the amount of exported functions.
2013-02-09 08:35:17 +01:00
Miek Gieben 8adb7c519c Flag bad rdlength as an error 2013-02-08 16:39:21 +01:00
Miek Gieben ababac6b57 Exclude msg.Compress from json 2013-01-24 20:46:07 +01:00
Miek Gieben 951af98c7e fix multiple edns0 option code 2013-01-22 16:41:41 +01:00
Miek Gieben 81c44fbac6 Grree, typo 2013-01-20 18:16:47 +01:00
Miek Gieben e66c2a1324 m.Size isnt used 2012-12-14 13:33:24 +01:00
Miek Gieben 9147aad21e need to add test for dynamic updates 2012-12-09 21:17:16 +01:00
Miek Gieben 29fa0ac7c0 unpack: allow for multiple edns0 options 2012-12-09 21:11:15 +01:00
Miek Gieben 9705bb8077 gofmt 2012-12-09 20:18:11 +01:00
Miek Gieben f56b237012 Fix zonesigning branch 2012-12-09 20:16:46 +01:00
Miek Gieben 940b786161 Merge conflict resolution 2012-12-09 20:15:31 +01:00
Miek Gieben 7fb499889a Type rename 2012-12-09 20:11:56 +01:00
Miek Gieben 235e892dfc Rename the RR types drop the RR_ prefix
This is also done in the official Go library. It also make the
code shorter.
2012-12-09 19:23:25 +01:00
Miek Gieben 3609f3e7a5 gofmt -s 2012-12-09 19:07:31 +01:00
Miek Gieben ff22456520 Also check when unpacking for domainnames > 255 2012-12-06 10:55:31 +01:00
Miek Gieben 4c6d89f727 PackDomainName: check for 255 or more octects
Adhire to the spec.
2012-12-06 10:48:55 +01:00
Miek Gieben f732827187 Add new error and fmt it 2012-12-06 10:40:14 +01:00
Miek Gieben d758825590 more documentation 2012-12-02 10:14:53 +01:00
Miek Gieben 2a3b818b95 Use much more descriptive names for the maps
Alg_str -> AlgorithmToString
 Rr_str  -> TypeToString

And for the reverse maps also.
2012-12-02 09:29:54 +01:00
Miek Gieben db014f9891 remove NSEC3 errors 2012-12-02 09:21:38 +01:00
Miek Gieben ac39024a25 gofmt 2012-11-21 23:20:56 +01:00
Miek Gieben 9e02a40cc8 Merge branch 'reader' 2012-11-21 22:32:23 +01:00
Miek Gieben 7bd7a65e4d Add CAA 2012-11-20 16:53:58 +01:00
Miek Gieben 67343920d5 Add CDS type 2012-11-20 16:52:18 +01:00
Miek Gieben 4737bfa319 Add the all important RKEY 2012-11-20 16:48:28 +01:00
Miek Gieben 3686d24ca7 Add NINFO record 2012-11-20 16:42:16 +01:00
Miek Gieben f7956a96e6 ATMA 2012-11-20 14:32:06 +01:00
Miek Gieben d34c05f4fc Add def. of SIDN RR 2012-11-20 14:14:00 +01:00
Miek Gieben f6896bea4f Add X25 Resource Record 2012-11-20 14:07:16 +01:00
Miek Gieben 35744e52f8 semi add the NULL record 2012-11-20 13:53:41 +01:00
Miek Gieben 534b3ddfd8 Actually parse the uint64 as uint64, not as uint48 2012-11-19 12:30:42 +01:00
Miek Gieben 27de9bad36 Actually parse the whole uint64 2012-11-19 12:26:13 +01:00
Miek Gieben 4aea3d193b Add L32 record 2012-11-17 21:32:02 +01:00
Miek Gieben 0c3a90193a Add the NID record 2012-11-17 21:26:48 +01:00
Miek Gieben bf85adb03e Fix \DDD printing and parsing 2012-11-15 14:26:08 +01:00
Miek Gieben 5cb0346b60 \DDD in PackDomain works
Unpacking does not insert \DDD yet
2012-11-15 13:51:15 +01:00
Alex Polvi ec8d3d51d1 initial stab at edns update lease http://files.dns-sd.org/draft-sekar-dns-ul.txt 2012-10-15 18:37:19 +01:00
Miek Gieben 3c5c9da8be we already know the length of message 2012-10-11 13:06:27 +02:00
Miek Gieben c5f0ecbdd8 in case of error do get the exact tag 2012-10-11 12:58:43 +02:00
Miek Gieben 6e43b3b666 Remove Tag.Get() and just look at the raw strings 2012-10-11 12:57:08 +02:00
Miek Gieben 506a4237e5 no nil checks 2012-10-10 21:00:47 +02:00
Miek Gieben 83b362dce6 optimization 2012-10-09 22:06:35 +02:00
Miek Gieben d0d9c92612 fix typo 2012-10-09 22:01:57 +02:00
Miek Gieben f38ce1b9b5 These non descriptive errors can go 2012-10-09 21:19:12 +02:00
Miek Gieben 570bf8dc69 Use proper error in packing and unpacking
All the relevant functions now return an error instead of
a simple boolean. This greatly approves the feedback to coders.

Spotted some fishy error handling along the way and fix that too.
2012-10-09 21:17:54 +02:00
Miek Gieben 099c19d5b2 Fix errors 2012-10-09 20:25:25 +02:00
Miek Gieben 4ebfc6b220 Merge branch 'v2' 2012-09-19 21:01:39 +02:00
Miek Gieben 3e1111c6b3 concurrent signing implementation 2012-09-12 21:22:28 +02:00
Miek Gieben 449c2c013d Rename ErrXfrSoa to ErrSOA 2012-09-12 21:13:57 +02:00
Miek Gieben 3a6edfa2c9 fmt 2012-09-10 20:51:19 +02:00
Miek Gieben 379cb2483a I dont think these need to be exported 2012-09-09 13:24:21 +02:00
Miek Gieben e9ea2d7750 Fix more robust, but also nack more about non qualified names 2012-08-31 20:57:16 +02:00
Miek Gieben 7be4f3b18d comment out all println, no need to worry people with that 2012-08-31 10:23:50 +02:00
Miek Gieben 86b16ccd9e make PackDomainName faster by removing these ifs. also fix test 2012-08-30 16:45:11 +02:00
Miek Gieben a2b2a604e2 dont panic, just return 2012-08-28 18:25:55 +02:00
Miek Gieben e4fb00c34d Fix handling of non fully qualified domain names
When PackDomain sees such a name it calls panic.
All panic now use the prefix 'dns:'
2012-08-28 18:21:23 +02:00
Miek Gieben 468d937c8f much stricter memory allocation for msg
Only allocate what you need=+1 (just to be sure)
2012-08-26 22:29:48 +02:00
Miek Gieben 03af57964a Add a length that taks compression into account
Currently only ownername compression is done, but its a good
start.
2012-08-26 20:46:24 +02:00
Miek Gieben 7444d67bfd tweaks 2012-08-25 22:40:32 +02:00
Miek Gieben 2a391d079b fmt 2012-08-25 11:32:11 +02:00
Miek Gieben 845f4a6992 dont export - minimize api 2012-08-24 12:42:41 +02:00
Miek Gieben 6f7aad15d8 documenation 2012-08-21 17:36:58 +02:00
Miek Gieben b0fc5a2f22 re-export these - I use them in unbound 2012-08-20 18:03:15 +02:00
Miek Gieben 7b406f80ce dont export 2012-08-17 08:34:46 +02:00
Miek Gieben b1140cec5f dont export 2012-08-17 08:34:17 +02:00
Miek Gieben 73b6d37885 cleanup api, dont export Year68 2012-08-17 08:29:45 +02:00
Miek Gieben a9126f1b54 Add RT type 2012-08-10 09:22:50 +02:00
Miek Gieben f05b532a3f gofmt 2012-08-08 11:13:28 +02:00
Miek Gieben 1e58ea2d5f more sane logging 2012-08-07 08:28:56 +02:00
Miek Gieben 1faf557ac1 Remove unused stuff 2012-08-05 21:11:41 +02:00
Miek Gieben 2d2b4f5e64 tweaks to give more power to unbound package 2012-07-01 20:58:54 +02:00
Miek Gieben 534433a714 gofmt -w 2012-06-20 20:16:36 +02:00
Miek Gieben 0be3b7c8a3 really add TLSA 2012-06-04 13:57:26 +02:00
Miek Gieben 814731aae3 really add tsla 2012-06-04 13:54:43 +02:00
Miek Gieben 89ec077d8f Support the WKS record 2012-06-02 17:33:49 +02:00
Miek Gieben fb0623fbb2 change comments 2012-06-01 22:23:21 +02:00
Miek Gieben de95ac0bb3 gofmt 2012-06-01 13:35:52 +02:00
Miek Gieben bb376b18b3 Add size received to a pkt 2012-06-01 10:05:27 +02:00
Miek Gieben 1bf0864632 First pass for edns subnet support 2012-05-31 21:40:07 +02:00
Miek Gieben 29365cc9d8 more consistent naming 2012-05-31 19:33:12 +02:00
Miek Gieben b0c12388e8 Give edns0 support as much need upgrade
Its now much nicer and more Go like. In essence ENDS0
is a sort of a mini RR parser.
2012-05-31 18:36:27 +02:00
Miek Gieben 7a3af5b729 Support $GENERATE (the bind extension).
It is even better than the bind one, because all records are
supported (as long as the output is valid)
2012-05-20 15:28:27 +02:00
Miek Gieben 3611c4d458 fmt 2012-05-05 17:37:48 +02:00
Miek Gieben 9cabad70a8 Remove Rtt from dns.Msg, does not belong there 2012-05-05 09:49:33 +02:00
Miek Gieben be93e4bf2d Also add the remote server. TODO, but handy incase of async queries/replies 2012-05-04 23:25:41 +02:00
Miek Gieben fc599d23fe Save rtts for clients 2012-05-04 23:18:29 +02:00
Miek Gieben 1948cd2a90 Use go vetted struct tags
They had the form: "domain-name", now they are key value pairs (key is
always dns: `dns:"domain-name"`
2012-04-29 21:55:29 +02:00
Miek Gieben 4128822bbf Faster check 2012-04-24 23:23:30 +02:00
Taral 5fc37375db Always use "." for the root domain. 2012-03-17 23:43:12 -07:00
Miek Gieben 33c60cc532 Set *ALL* headers bits, now showing CD and AD
Fill in the missing pieces of the header
2012-03-09 20:42:40 +01:00
Miek Gieben 1009d83753 Fix opt not as last record 2012-03-06 19:28:34 +01:00
Miek Gieben 3232814d1b Fix client side TSIG
Redesign of TSIG. Validation is on the TOOD - this can be
done in the same way as in the server.
2012-03-01 22:40:34 +01:00
Miek Gieben b07a05d5ca prefix errors with dns: 2012-02-29 21:13:16 +01:00
Miek Gieben 99a7a57713 Upgrade the definition of domain name 2012-02-28 20:47:25 +01:00
Miek Gieben e816e64e3e doc tweaks, Len() tweaks 2012-02-28 20:43:08 +01:00
Miek Gieben ea57a49d94 Allow mnemonic algorithm numbers in DS (and DS-like) records 2012-02-27 19:17:58 +01:00
Miek Gieben b7f997cc6e Fix setting the rdlength for compressed names
RawSetRdlength was working with a 0xC00 bitmask which
should have been 0xC0.
2012-02-26 18:23:21 +01:00
Miek Gieben f6f91203d1 Also look at the msg header when validating 2012-02-25 19:12:02 +01:00
Miek Gieben 843abbef36 Fix nsec3verify for wildcard at the n.c. level
When a wildcard is not denied and the closest encloser *is*
denied we have a problem.

Thank to Peter van Dijk for pinging me
2012-02-24 21:26:01 +01:00
Miek Gieben c7dd37b000 Fix TXT validation 2012-02-22 22:11:40 +01:00
Miek Gieben b47f11ff9c Dont know what I wanted with this 2012-02-19 15:49:02 +01:00
Miek Gieben 73299288aa Remove the TODO 2012-02-19 15:38:21 +01:00
Miek Gieben 9bdd445088 HIP pack support - not tested 2012-02-19 15:37:27 +01:00
Miek Gieben c82a1af1e3 HIP unpack support -- not tested 2012-02-19 15:33:12 +01:00
Miek Gieben f45d4d933d Add length for base64 encodings 2012-02-19 15:24:26 +01:00
Miek Gieben 88a0052d1d Fix newline/space handling and braces
( dsjkdjk
djsdjk
)

( dkjsdjsd
  djskdjsd
)

Are two different strings, the above contains NO spaces, the bottom
one does. This doesn't matter anywhere, except in HIP record, which
say some data may not contain spaces.
2012-02-19 12:04:27 +01:00
Miek Gieben 32ce3502ae add HIP here too 2012-02-19 11:27:16 +01:00
Miek Gieben 37ef7bd219 More TXT related fixes
Add two corner cases for testing
2012-02-13 19:08:37 +01:00
Miek Gieben d235bf4c2e Remove debugging stuff 2012-02-13 16:18:42 +01:00
Miek Gieben c30821fece Fix TXT packing and unpacking 2012-02-13 16:12:26 +01:00
Miek Gieben 2c44133163 Fixes for the new presentation of txt records 2012-02-13 15:59:40 +01:00
Miek Gieben 77b60231e7 If we add a dot to a name, be sure to remove one from the length 2012-02-05 11:33:55 +01:00
Miek Gieben b639fa305d Fix overflow when the buffer is really small 2012-01-29 19:11:55 +01:00
Miek Gieben 402ce277df add the strings for these rcodes too 2012-01-29 18:55:49 +01:00
Miek Gieben 09ac6c8dc5 gofmt 2012-01-28 00:35:37 +01:00
Miek Gieben bc2b826f38 Remove udpsize from ListenAndServer, too ugly 2012-01-27 08:45:33 +01:00
Miek Gieben 784713d0e0 Docs 2012-01-26 22:52:29 +01:00
Miek Gieben 4f588a5d15 documentation 2012-01-26 22:46:59 +01:00
Miek Gieben 04cbdae47a Fix DS overflow when unpacking 2012-01-23 20:29:47 +01:00
Miek Gieben 7b67cbff49 Set the timeouts throughout the code. New Golang api 2012-01-23 20:25:15 +01:00
Miek Gieben 6e6b67afd5 Fix NSEC(3) with no bitmap 2012-01-23 11:30:26 +01:00
Miek Gieben 67573c14b3 Implement NSEC3 NODATA proof 2012-01-22 11:33:51 +01:00
Miek Gieben f25584e94e Overflow fixes 2012-01-21 12:35:19 +01:00
Miek Gieben 5917838cbb gofmt 2012-01-20 12:24:20 +01:00
Miek Gieben ea789b6f23 Add nsec3 NXDOMAIN proof 2012-01-19 19:48:09 +01:00
Miek Gieben 7bffcd35bb Start with nsec3 validation 2012-01-17 19:16:58 +01:00
Miek Gieben c0af79d3b3 slightly better documentation 2012-01-16 21:57:57 +01:00
Miek Gieben 240879c40d Documentation 2012-01-16 21:49:17 +01:00
Miek Gieben 9f3a1c1f13 Documentation and make ParseKey private (parseKey) 2012-01-16 21:44:49 +01:00
Miek Gieben 96d79c6816 Fix NSEC3/NSEC parsing. Looks much saner now 2012-01-16 13:45:45 +01:00
Miek Gieben 1ae8cb4101 Check nsec unpacking 2012-01-15 20:46:11 +01:00
Miek Gieben b4bf6278de Remove println 2012-01-15 17:18:44 +01:00
Miek Gieben 06fdc07772 Fix nsec3 decoding 2012-01-15 17:18:02 +01:00
Miek Gieben 0dcb849ca2 Fix NSEC3 encoding 2012-01-15 13:53:32 +01:00
Miek Gieben e76189c8f7 NSEC3 working for types < 256 2012-01-15 13:20:53 +01:00
Miek Gieben dc6c6d7c9e NSEC3 is starting to work 2012-01-15 12:15:05 +01:00
Miek Gieben 03a8ee13a2 NSEC3 encoding works
Only for 1 windows, but dig has stopped complaining. This
needs to be streamlined a little, but its looking good.
2012-01-14 11:08:42 +01:00
Miek Gieben 7f6a5f4497 Its isnt slow 2012-01-12 21:32:50 +01:00
Miek Gieben 7ddb5feb69 RawRdlength seems to work; 2012-01-12 21:10:29 +01:00
Miek Gieben 036d6e4c2c Fix edns0 overflow message 2012-01-12 20:22:21 +01:00
Miek Gieben 92a51b4374 Who wrote what 2012-01-12 10:53:19 +01:00
Miek Gieben 2543321215 Fix the packing failure
non-fqdn don't generate an packing failure. Need to do something
about this. Maybe not returning a bool from pack, but a real Error
2012-01-11 21:19:46 +01:00
Miek Gieben eb12c526f2 Add more tests 2012-01-11 21:03:47 +01:00
Miek Gieben 3886728bdb Add debug prints back in msg.go 2012-01-11 20:50:08 +01:00
Miek Gieben 416eb764c7 Much better message length 2012-01-11 20:37:26 +01:00
Miek Gieben f1a3b31384 Make a packStructCompress() to leave packStruct() simpler 2012-01-11 20:33:38 +01:00
Miek Gieben eafe995a56 Add a compression flag to msg struct 2012-01-11 20:26:39 +01:00
Miek Gieben 0008471adf Add empty CompressedLen function 2012-01-11 20:12:38 +01:00
Miek Gieben 13f1f5b066 Question is compressible IMO 2012-01-11 16:22:58 +01:00
Miek Gieben 1de9cff07a BIND cannot handle compressed dynamic updates 2012-01-11 16:19:49 +01:00
Miek Gieben dfd7700790 Compression is not allowed in dyn. updates 2012-01-11 16:18:17 +01:00
Miek Gieben 6d95911558 Dont allow the question section to be compressed 2012-01-11 16:16:09 +01:00
Miek Gieben f39d939f52 Fix compression
The compression was fixed. Also the packing of message is been speed
up, by a facter of 3. Now the packing happens once, instead of
3 times.

Two tests still fail. atm
2012-01-11 16:04:52 +01:00
Miek Gieben bbd8c42de6 Fix the tests 2012-01-11 14:17:09 +01:00
Miek Gieben 6bf1255177 Fix compression 2012-01-11 14:09:47 +01:00
Miek Gieben ba869578fd Implement compression 2012-01-11 11:44:44 +01:00
Miek Gieben b5d73f1eff Implement compressible domain names 2012-01-11 11:19:07 +01:00
Miek Gieben 974c28d1b1 More fixes for compression 2012-01-11 11:13:17 +01:00
Miek Gieben f66bb9d6f5 Merge fixed 2012-01-10 16:05:30 +01:00
Miek Gieben 15d82f0b34 Fix the size -- was counting the labels, not the bytes 2012-01-10 13:47:34 +01:00
Miek Gieben 3b30c6e0b5 Need to work even harder to fix the length, but this is much better 2012-01-10 10:46:55 +01:00
Miek Gieben bacfa5a80c A Len() to RR interface
This isn't yet finished, but it helps in asserting the amount of
space to alloc when packing a message
2012-01-10 10:43:28 +01:00
Miek Gieben cedf11f27b Working compression algo 2012-01-10 08:52:18 +01:00
Miek Gieben 6e0340d46f Remove debugs 2012-01-09 21:27:52 +01:00
Miek Gieben f90270014c This is a working name compression 2012-01-09 21:27:31 +01:00
Miek Gieben 973c5f3e1a Add a splitlabels 2012-01-09 11:02:45 +01:00
Miek Gieben e522a6daf7 Make all tests fully qualified 2012-01-08 15:34:42 +01:00
Miek Gieben 58e5def52a Allow A records without rdata 2011-12-17 20:31:31 +01:00
Miek Gieben dd14200da0 Revert back to slower Rdlength setting
That at least works...
2011-12-17 20:13:35 +01:00
Miek Gieben 4c50439700 Add it 2011-12-16 19:29:24 +01:00
Miek Gieben de3f0f3903 Documentation and make the random better 2011-12-16 19:28:35 +01:00
Miek Gieben 131f6962d1 gofmt 2011-12-09 21:45:57 +01:00
Miek Gieben 2e0a4a5e34 Allow A records without Rdata 2011-12-09 21:42:49 +01:00
Miek Gieben 88c12387f9 Fixes 2011-12-09 16:07:17 +01:00
Miek Gieben ad11f2425e export Unpack/PackDomainName 2011-12-09 15:58:36 +01:00
Miek Gieben e115e5da6e Update to the latest weekly: weekly/weekly.2011-12-06
The new time API must still be used. But for now it compiles.
All DNSSEC/TSIG timing is probably broken
2011-12-09 11:16:49 +01:00
Miek Gieben 22a467e718 Fixes the latest weekly 2011-11-02 23:06:54 +01:00
Miek Gieben 6e403621e1 Fix NSID (or OPT option code 3) 2011-09-26 09:11:14 +02:00
Miek Gieben 1a81ac9c85 NSID is broken 2011-09-20 12:52:23 +02:00
Miek Gieben 850a12ac8e Return a error when there is no conn, dont panic 2011-09-20 10:20:24 +02:00
Miek Gieben fb68e29eb1 Create fp as a type 2011-09-19 22:27:56 +02:00
Miek Gieben 7d73d6e9e1 Make opcode public and fix the IsEdns0 2011-09-19 13:34:16 +02:00
Miek Gieben 5960047748 Make them public 2011-09-19 13:25:02 +02:00
Miek Gieben 6ef13c3cbd Start thinking about server side axfr 2011-09-11 17:24:52 +02:00
Miek Gieben 6e72207318 Simplify tsig
Add a couple of errors, and make the function signature
of the tis function more inline with the dnssec ones.
2011-09-10 16:50:27 +02:00
Miek Gieben b7ca96e7d4 Normalize errors
Use the errors as defined in msg.go and a few.
2011-09-09 10:21:04 +02:00
Miek Gieben 18596dd3f8 Use typeANY, not typeALL 2011-08-22 14:11:41 +02:00
Miek Gieben c37686a724 remove len(s) from the fastpath 2011-08-09 11:41:44 +02:00
Miek Gieben 100f8ef7eb Remove len(msg) in favor of a variable with that value 2011-08-09 10:54:58 +02:00
Miek Gieben 1053090121 performace tweaks 2011-08-09 10:29:30 +02:00
Miek Gieben da5d2e91a8 Remove another small allocation 2011-08-09 10:16:45 +02:00
Miek Gieben c64f506103 Remove a packStruct - should improve performance 2011-08-08 15:28:19 +02:00
Miek Gieben 982f277a44 kill a packStruct 2011-08-08 14:09:05 +02:00
Miek Gieben 861a2adb6c Forget to the add the i := fv.Uint() 2011-08-08 13:10:35 +02:00
Miek Gieben 2a596f60b9 impl. the recent changes from the reflect package 2011-08-08 10:15:24 +02:00
Miek Gieben d6716f693d impl. the recent changes from the reflect package 2011-08-08 09:49:25 +02:00
Miek Gieben 27948bb9f9 Use uint16 instead of int 2011-08-04 15:13:10 +02:00
Miek Gieben 6931e1e215 Adapt ns to the new (fast) zone structure 2011-07-29 14:15:59 +02:00
Miek Gieben da0603089a gofmt -w 2011-07-23 23:43:43 +02:00
Miek Gieben 9b1e7b4b3d documentation
make Str_rr and Str_class private, prolly only needed
for parsing
2011-07-23 23:15:40 +02:00
Miek Gieben 2e4f0cc015 goto restrictions 2011-07-18 13:26:57 +02:00
Miek Gieben f1cbdbd9d4 New goto rules 2011-07-18 13:12:22 +02:00
Miek Gieben 77f4205cea I can parse rrs now 2011-07-14 21:25:15 +02:00
Miek Gieben 3f69a63128 class NONE added 2011-07-06 17:33:16 +02:00
Elazar 904e322dfd Ran gofix, and manually bring code up to latest go release.
1) Ran gofix on all files.
2) Added "tcp" and "udp" to Resolve* functions in server.go
3) Generated primes to the primes array and not to two predefined
   struct members (P and Q), since now rsa support multi-factor primes.
2011-06-02 13:31:12 +03:00
Miek Gieben e5a769baf0 Fix up API and documentation 2011-03-30 14:54:43 +02:00
Miek Gieben 2d7a1cddeb Add QuerySimple
Some examples are working again. Things are getting
better.

Still need to think about a generic Config (ClientConfig)
for parsing the /etc/resolv.conf
2011-03-29 10:15:42 +02:00
Miek Gieben 135772de9f complete rewrite the resolver side
make it mirror the server side and thus
async and concurrent
2011-03-28 10:01:10 +02:00
Miek Gieben f2a93a155b Implement all other TSIG checks 2011-03-25 14:46:30 +01:00
Miek Gieben ec0a52ccac documentation 2011-03-25 11:20:52 +01:00
Miek Gieben 8aa88a0bd3 normalize errors 2011-03-25 11:19:35 +01:00
Miek Gieben 87845a9cb1 Formatting 2011-03-24 09:24:49 +01:00
Miek Gieben 25bdf43f06 more documentation updates 2011-03-23 19:37:07 +01:00
Miek Gieben 0059556516 More TSIG changes. Curious if they amount to something 2011-03-15 16:18:13 +01:00
Miek Gieben 82bb573f56 more tsig work - still does not validate but getting close 2011-03-14 12:28:04 +01:00
Miek Gieben 36b77b3b8b Fix txt rdata 2011-03-14 09:38:29 +01:00
Miek Gieben b0dad846ad Fix TSIG 2011-03-13 19:01:57 +01:00
Miek Gieben 0a742210ca Add DHCID record 2011-03-13 13:11:11 +01:00
Miek Gieben e585cbf8f4 Add KX record 2011-03-13 13:04:54 +01:00
Miek Gieben 735c254a3b Fix TSIG and make check if is works with axfr (yes) 2011-03-11 14:24:33 +01:00
Miek Gieben dfcd170f99 Fixes 2011-03-04 17:19:19 +01:00
Miek Gieben 47d5db5392 Decode NSEC3/NSEC with an any types correctly 2011-03-02 16:18:24 +01:00
Miek Gieben 7014ede8bb Add -short option that does not display the long key and sig data 2011-03-01 14:57:21 +01:00
Miek Gieben e6dc03baeb Shuffle the dns constant to dns.go 2011-02-28 10:42:03 +01:00
Miek Gieben 5c6f9f613e implement parsing of longer (>255) txt records 2011-02-28 10:28:07 +01:00
Miek Gieben 98e4b33cb5 formatting and documentation 2011-02-24 16:22:14 +01:00
Miek Gieben 266ed16e72 refactor the rrset to signedata function 2011-02-24 15:29:36 +01:00
Miek Gieben b19fa97c1d Add URI RR type - type just got allocated number 256 2011-02-23 09:11:03 +01:00
Miek Gieben 157c19af4b Fix real dots in domain names 2011-02-21 20:56:05 +01:00
Miek Gieben c7c4d8061e Allow for escaping of dots in domainnames 2011-02-21 20:33:36 +01:00
Miek Gieben 865ba16420 small bug 2011-02-21 19:29:42 +01:00
Miek Gieben a90533a13f implement unknown RRs
RFC3597 - unknown rr are implemented. Currently Go dns
needs to now the type code, but must lack the actual implementation
of that type.
See IPSECKEY as an example.
2011-02-21 15:57:15 +01:00
Miek Gieben daaeaba69b Add unknown resource record parsing 2011-02-21 15:44:42 +01:00
Miek Gieben 1743555d07 add TALINK 2011-02-21 13:24:45 +01:00
Miek Gieben 65c4282944 add TA and DLV records 2011-02-21 13:16:07 +01:00
Miek Gieben 241d441371 fix the multiplexing 2011-02-09 17:59:06 +01:00
Miek Gieben 9fc9f325b8 Folded resolver back into main package 2011-02-08 20:15:54 +01:00
Miek Gieben d87e7eff86 support nsec3 and nsec3param 2011-02-03 20:39:43 +01:00
Miek Gieben f934968d00 remove printlns 2011-01-27 20:24:58 +01:00
Miek Gieben 0f9b484e6d remove prints from msg.go, not nice to do in the library 2011-01-27 19:35:34 +01:00
Miek Gieben d9dfd913a7 documentation updates 2011-01-27 09:29:11 +01:00
Miek Gieben bdde78ff2f TSIG works 2011-01-26 15:13:06 +01:00
Miek Gieben 8b832018a4 numerous tsig fixes - validation and generation almost working 2011-01-25 23:40:45 +01:00
Miek Gieben c40c936cf5 Fix tsig - now add verify stuff 2011-01-25 22:05:16 +01:00
Miek Gieben df4fb16e14 Fix tsig unpacking (i.e. it works now) 2011-01-25 21:57:17 +01:00
Miek Gieben 1ece21a05e Fix Tsig parsing 2011-01-25 15:09:30 +01:00
Miek Gieben 3699c21a53 added SPF 2011-01-25 14:07:01 +01:00
Miek Gieben 7e1f9490f2 Cert RR added
PubKey is named PublicKey in the RR_DNSKEY
2011-01-25 13:57:54 +01:00
Miek Gieben 2431b84a3c added DNAME 2011-01-25 13:47:12 +01:00
Miek Gieben 05c75c348b Add funkenstorm
Added funkenstorm, only does stripping of additional section

Fix encoding of ipv4 addresses that are put in a  16 byte buffer (AAAA).
Just assume the last four bytes are ipv4 in that case
2011-01-21 12:55:35 +01:00
Miek Gieben e544237d36 slightly better formatting of the flags in msg.String() 2011-01-18 19:19:42 +01:00
Miek Gieben ec441e36e1 Add Meta data to the resolver 2011-01-18 15:44:30 +01:00
Miek Gieben 9eea4682fd Fix documentation 2011-01-17 21:10:48 +01:00
Miek Gieben 5442276337 NSEC3PARAM record 2011-01-17 16:09:30 +01:00
Miek Gieben e57dc24115 A simple responder nameserver 2011-01-17 15:43:54 +01:00
Miek Gieben 74796c8672 Add SRV and NAPTR record support 2011-01-17 10:30:20 +01:00
Miek Gieben 508103a287 make the parsing compile - complete unusable atm 2011-01-15 14:40:54 +01:00
Miek Gieben 54f158c23d Helper functions for base64 encoding/decoding 2011-01-15 10:38:14 +01:00
Miek Gieben 578304226f Add dnskey gen for RSA keys 2011-01-10 16:10:15 +01:00
Miek Gieben 69f9bc6ecd Start packing nsec/nsec3 typeBitMap 2011-01-09 22:51:36 +01:00
Miek Gieben d3f9bbe2c9 Set order correctly 2011-01-09 22:06:24 +01:00
Miek Gieben 7da3d0bcb7 Fix the NSEC(3) bitmap 2011-01-09 22:02:25 +01:00
Miek Gieben a6fee19f4c Fix tsig by making timeSigned a 64 bit int
only use the lower 48 bits to make it all work
2011-01-09 15:30:45 +01:00
Miek Gieben 11a1c753a8 Pack a uint48 as a [3]uint16 2011-01-08 23:47:24 +01:00
Miek Gieben 1b39853f03 tsig generation; first stab 2011-01-08 22:39:15 +01:00
Miek Gieben b2e9fc8d84 Added TSIG
By defining a new struct I can re-use all the nice
stuff in msg.go
2011-01-08 21:51:20 +01:00
Miek Gieben a5100db599 Complete fix NSID
parsing/reading and setting al work now
2011-01-06 14:58:58 +01:00
Miek Gieben d4059485d5 Add even more rcodes 2011-01-03 10:44:00 +01:00
Miek Gieben aeb1ce8d9c Fix the constnames 2011-01-01 20:51:34 +01:00
Miek Gieben 10bfb3d036 Complete the list of DNS q opcodes 2011-01-01 19:51:25 +01:00
Miek Gieben 7c2de14b8d add TKEY and finalize TSIG
No crypto validation ofcourse... only the definition of the RRs
2011-01-01 19:26:08 +01:00
Miek Gieben 43ebf75fac Fix XFR
The example test performs an axfr, but as ixfr differs slightly
it should also support ixfr
2011-01-01 17:42:13 +01:00
Miek Gieben 1c9282ed7e Framework for xfr started in resolver 2010-12-31 17:05:11 +01:00
Miek Gieben 0dcdbe4361 Fix DNS over TCP
Actually send the 2 bytes length and also be prepared
to receive them.
2010-12-31 14:11:52 +01:00
Miek Gieben cc66917658 Add basic support for the LOC record 2010-12-30 20:55:25 +01:00
Miek Gieben 2decd91cb4 Add the NAPTR record 2010-12-30 20:50:31 +01:00
Miek Gieben ec2e732ad3 Better handle error in pack/unpacking 2010-12-30 17:15:59 +01:00
Miek Gieben 9d1d7444a3 Some fixes from creating a dig-like program 2010-12-30 16:38:16 +01:00
Miek Gieben bcf320aad4 rename the examples dir
Make it *not* show up in godoc
2010-12-30 14:13:28 +01:00
Miek Gieben 15dd65171b Split the package in multiple packages
dns - the standard rrtypes and such
    dnssec - validation, keytag calculation, etc
    resolver - for talking to servers
2010-12-30 13:42:52 +01:00
Miek Gieben 4ed14b9785 More cleansup and robustness
* make the resolver more robust
* more dnssec functions
2010-12-28 09:41:54 +01:00
Miek Gieben 8dbefdd3f1 Add key2ds conversion
More DNSSEC pieces are coming together
2010-12-27 13:56:58 +01:00
Miek Gieben 36b181f65a Add keytag calculation
Still slow, but it is working. Added testcase for this too
2010-12-27 12:49:48 +01:00
Miek Gieben 830b2eae29 add hex encoding for DS record
* some more edns finishing touches
2010-12-27 09:58:45 +01:00
Miek Gieben d6efd37302 Some cleanup 2010-12-25 13:09:27 +01:00
Miek Gieben 65caf6f891 Documentation!
Make the packet documentation much nicer.
2010-12-25 11:14:11 +01:00
Miek Gieben 7d0a9dd4ca remove debugging code 2010-12-23 17:13:10 +01:00
Miek Gieben d1e5b182a7 remove some debugging code 2010-12-23 17:10:06 +01:00
Miek Gieben 04a18e9937 Define NSEC3 and NSEC and NSEC3PARAM RRs
Those come with new rdata-types that still needs to be impl.
2010-12-23 16:37:54 +01:00
Miek Gieben 94de3401fe cleanups; rm unused stuff 2010-12-23 14:31:36 +01:00
Miek Gieben 18afd5e536 EDNS is easy
Only the OPT RR needs to be supported
2010-12-23 14:07:35 +01:00
Miek Gieben 8302d19b42 At least it gives formerr now 2010-12-23 11:02:01 +01:00
Miek Gieben 4668b309e2 seems to have a working edns impl 2010-12-23 10:43:10 +01:00
Miek Gieben 25f2e3d7e8 Look at the domain to see if it is edns
throw this information back upwards so the
the Edns bool can be set.
2010-12-23 09:51:43 +01:00
Miek Gieben 1a50861b43 another stab at edns0 2010-12-22 23:05:21 +01:00
Miek Gieben 4ce23b71cf Fix the encoding a EDNS RR
Still need to handle the domain name packer, so that we can
detect we have an OPT RR, with the different encoding
2010-12-22 20:53:18 +01:00
Miek Gieben 63c4d10ed0 Add stuff for EDNS 2010-12-21 21:12:43 +01:00