Commit Graph

339 Commits

Author SHA1 Message Date
Miek Gieben 35bcc78d76 Implement PX record 2013-10-13 13:23:02 +01:00
Miek Gieben cc2c42cc91 Implement GPOS record 2013-10-13 13:01:33 +01:00
Miek Gieben 961e137891 Add NSAP and NSAP-PTR record 2013-10-13 12:25:08 +01:00
Miek Gieben fc7a8472dc isnt used 2013-10-01 10:27:08 +00:00
Miek Gieben 67065da09c Fix the CAA type 2013-09-27 08:51:20 +00:00
Miek Gieben 4e6b3a5afc Check for the end of the message 2013-09-22 19:35:10 +01:00
Ask Bjørn Hansen 55c1f95213 Support the new RFC6891 EDNS0 SUBNET option code
Also keep support for the old draft code
2013-09-19 22:31:28 -07:00
Miek Gieben 9c1ee5d5ca Update IsDomainName
This new functions just compiles the domain to wire format, if that
works, the name is deemed OK. It is also much less strict than the
older code. Almost everything is allowed in the name, except two
dots back to back (there is an explicit test for that).
2013-09-10 18:09:22 +00:00
Miek Gieben b6a2d1fb5e Allow empty rdata in records
Empty or no rdata is allowed for dynamic updates, so test if this
works for packing/unpacking. It only fails for TSIG (which is
never seen in zone files), SOA (which is not seen like this in dyn.
updates) and WKS (just an old record).
2013-08-31 20:24:52 +01:00
Miek Gieben fdcdc6dbf6 Add test to zero rdata (for dyn updates)
This triggerd a bunch of failures, the most important one
is the packing and zero length domain name now works.
2013-08-26 21:11:24 -07:00
Miek Gieben 6ef2debe4e Add copy for an entire message, private for now 2013-08-23 22:53:05 +00:00
Miek Gieben 09d7d3e79d Some TODO updates 2013-06-29 09:50:43 +01:00
Miek Gieben 9fa50d8ac2 Fix the nsec/3 length calculation
This overshoots, 'cause it only counts the windows, not the
actual bitmap sizes in the window. But it keeps the code
simple and fast.
2013-06-27 20:19:02 +01:00
Miek Gieben 55aa4480c7 Fix some typos 2013-06-27 19:46:26 +01:00
Miek Gieben 61919d8713 Add all the compressible types to Len()
Len() now performs its duty, question is, *is* this now faster/better
than just packing a Msg, checkings its lenght and discarding the buffer.
2013-06-27 09:07:01 +00:00
Miek Gieben 1ad76fe65b Added packLen
packLen() returns the length of an uncompressed packet buffer, this
is used when packing a packet. This is needed for compression. When
compression is used, we first create the full packet and *then*
compress it. If we use Len() which accounts for compression, we can
get buffer overruns, when packing the (then still uncompressed) packet.
2013-06-26 22:18:09 +01:00
Miek Gieben 38ea608d79 Rename the Label* functions
SplitLabels -> SplitDomainName
CompareLabels -> CompareDomainName
LenLabels -> CountLabel
          -> NextLabel was added as a simple iterator-like function
2013-06-22 07:21:15 +00:00
Miek Gieben a317648fa3 Add some more TODOs to Pack and kill the println
This closes #46 (for now :-) )
2013-06-20 07:28:51 +01:00
Miek Gieben 5f6228d4cc Use the non-exported version err 2013-06-20 07:27:28 +01:00
Miek Gieben 70f9c6b964 Make err non-exported 2013-06-20 07:25:29 +01:00
Miek Gieben b697d25ed9 Remove unneed string conversion here 2013-06-14 11:38:04 +00:00
Miek Gieben 9ee7c27e18 Fix rawSetRdlength
When searching for the start of the rdata, the offset wasn't properly
calculated. This only impacted names with \DDD in it (weirdly enough).
2013-06-14 11:35:06 +00:00
Miek Gieben 3f348f173b \DDD to buf parsing fails (sometimes)
Added test (that fails for now)
2013-06-14 07:31:22 +01:00
Miek Gieben c66494c6c5 Resolv merge conflicts 2013-05-12 19:08:37 +02:00
Miek Gieben 98b677a97c Update the copy right for the original GO files 2013-05-12 16:07:06 +02:00
Miek Gieben 320d981509 Add Algo-signal-draft impl. for EDNS0 2013-05-11 21:02:17 +02:00
Miek Gieben ec9ac92fad Half the parsing of the EDNS LLQ package 2013-05-08 23:03:02 +02:00
Miek Gieben 6ecde82c20 Remove UPDATE_LEASE to UL
The "other" edns0 option will then become LONG_LIVED_QUERIES which
is way to long to be practical, so I want to make it LLQ, UPDATE_LEASE
then needs to be come UL.

This will probably impact no-one, because noone uses this (I hope)
2013-05-08 22:28:19 +02:00
Miek Gieben 709d11aa2c update documentation 2013-05-06 22:23:13 +02:00
Miek Gieben d53d9eab81 gofmt 2013-05-05 20:30:44 +02:00
Miek Gieben 495b7d6552 Add UID/GID/UINFO record 2013-04-30 16:42:04 +02:00
Miek Gieben 8285ae4e56 add uinfo uid gid and unspec rr type number 2013-04-30 15:20:01 +02:00
Miek Gieben cb4c191bd3 more docs 2013-04-27 17:12:22 +01:00
Miek Gieben 8d0b1a32cf Add the code, but does fit in the map anymore 2013-04-27 17:02:28 +01:00
Miek Gieben d075d4cad1 update readme 2013-04-27 16:57:33 +01:00
Miek Gieben f43b7368bd Add tests for EUIxx 2013-04-16 08:41:35 +01:00
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