Commit Graph

339 Commits

Author SHA1 Message Date
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