Commit Graph

2758 Commits

Author SHA1 Message Date
Miek Gieben 9c75b3cdc2 Fi the tests too 2014-01-27 14:45:34 +00:00
Miek Gieben 39a8e2b8af Small api change to check RRSIG validity 2014-01-27 14:42:17 +00:00
Miek Gieben 9c0ff1489b Merge branch 'master' of github.com:miekg/dns 2014-01-27 14:32:07 +00:00
Miek Gieben bb2ef9e3fc Add generic Copy function that copies RRs
Don't export all the copy() functions, instead add a Copy() function
that use the RR interface
2014-01-27 14:25:24 +00:00
Miek Gieben c97bb6d79d The right way around 2014-01-26 20:22:19 +00:00
Miek Gieben 2a659fce45 dnssec: don't override OrigTtl in sig
When creating a signature and the OrigTtl is already set
don't override it.
2014-01-26 19:53:49 +00:00
Miek Gieben be9e7276e9 Update documentation 2014-01-26 13:05:48 +00:00
Miek Gieben 3e0b079861 Merge pull request #78 from philips/fixup-example
fix(dns.go): Pref is now Preference
2014-01-26 00:30:54 -08:00
Miek Gieben 0a6d66e82d Merge pull request #79 from millerkil/opt-compress-help
Optimize compressionLenHelper
2014-01-26 00:26:15 -08:00
Alex Ciuba 3768fa0083 Optimize compressionLenHelper 2014-01-25 21:09:28 -05:00
Brandon Philips 870c049f52 fix(dns.go): Pref is now Preference
Simple mistake from, what I guess, was an earlier API change.
2014-01-25 15:57:16 -08:00
Miek Gieben 80d453b82d Merge pull request #77 from millerkil/optimize
Overallocate label index buffer
2014-01-25 13:48:46 -08:00
Alex Ciuba e429f38a76 Overallocate label index buffer 2014-01-25 14:21:46 -05:00
Miek Gieben 0364de3abf Make EDNS0 unpack return error on failure
Report these errors upwards when unpacking a message.
2014-01-24 10:09:22 +00:00
Miek Gieben 7004ce03e8 Merge branch 'master' of github.com:miekg/dns 2014-01-24 09:25:37 +00:00
Pieter de Boer e32b05768f Fix length overrun in EDNS0 parsing.
Original text: (in Dutch)

Ik kreeg crashes (index out of range) in het parsen van een EDNS0_LLQ
optie, doordat de method: 'func (e *EDNS0_LLQ) unpack(b []byte)' een
byte slice van 1 byte groot kreeg waar dan meerdere uint16's uit gelezen
werden.
2014-01-24 09:15:56 +00:00
Miek Gieben 5d856e327f Merge pull request #76 from andrewtj/atj-constant-time-tsigverify
Make TsigVerify's MAC comparison take constant time
2014-01-23 23:23:20 -08:00
Andrew Tunnell-Jones 857a1c66cb Make TsigVerify's MAC comparison take constant time 2014-01-24 03:28:08 +00:00
Miek Gieben fd12a9cea4 Rename this variable 2014-01-19 07:45:16 +00:00
Miek Gieben e78a7436aa Check if the string is empty. 2014-01-18 22:02:49 +00:00
Miek Gieben b0c068e420 docs 2014-01-12 13:47:03 +00:00
Miek Gieben 37356f5e68 Documenation fixes 2014-01-12 10:43:59 +00:00
Miek Gieben ce360dab57 fmt 2014-01-12 10:22:04 +00:00
Miek Gieben 00a08d77fc PackBuffer: slight cleanup in docs 2014-01-12 10:21:23 +00:00
Miek Gieben 7f8964662e Merge branch 'majek/packwithbuffer' of https://github.com/majek/dns into bufpack 2014-01-12 10:17:35 +00:00
Miek Gieben be9467466c Formatting and reshuffle some code 2014-01-12 10:11:23 +00:00
Miek Gieben 3342ee9d85 Rename dupIP to copyIP
Also make the function shorter.
2014-01-12 10:09:54 +00:00
Miek Gieben a56060b558 Cleanups for Copy()
Docs and slight code formatting issues.
2014-01-12 10:04:38 +00:00
Miek Gieben 189f4a23fc Merge pull request #74 from majek/marek/deepcopy
msg.Copy() makes a deep-copy of the msg object
2014-01-12 02:03:17 -08:00
Miek Gieben 82b2b6ec82 QuoteToASCII is needed
When not using this, TXT strings get interpreted by Golang, making
TXT behave unexpected. QuoteToASCII has surpises too, see
TestTxtEqual(), but this, I hope, lesser of an issue.
2014-01-11 17:17:38 +00:00
Miek Gieben a49cd38336 Add quoteString function.
This is to just quote a string s -> "s"
2014-01-11 16:57:36 +00:00
Miek Gieben 3bd18e9a56 add test for matching text records 2014-01-11 16:32:08 +00:00
Miek Gieben ef732d1050 RRSIGs: parse epoch timestamp too
According to RFC4034 the timestamp in RRSIG may also be an EPOCH.
Check for this when parsing. Knot DNS zone dumps contain timestamp
RRSIG, this makes those parseable by Go DNS.
2014-01-11 08:50:10 +00:00
Miek Gieben c174304212 Add test for RRSIG with timestamp in epoch
This is standard's compliant but currently not supported.
2014-01-11 08:37:34 +00:00
Miek Gieben f3af5834c2 Also add empty txt record in another test 2014-01-11 08:12:13 +00:00
Miek Gieben e64ea20885 Merge pull request #75 from andrewtj/atj-txtparsefix
Fix parsing TXT records containing empty strings
2014-01-11 00:07:07 -08:00
Andrew Tunnell-Jones 549ed97be1 Fix parsing of TXT records containing empty-strings 2014-01-11 05:33:23 +00:00
Andrew Tunnell-Jones 938210c3ad Test parsing of TXT records containing empty-strings 2014-01-11 05:31:43 +00:00
Andrew Tunnell-Jones 91f31a2b71 Define length in multi-entry TXT parse length test in terms of header + rrdata 2014-01-11 05:30:46 +00:00
Andrew Tunnell-Jones 4584fc0cb3 Fix single-entry TXT parse length test 2014-01-11 05:28:47 +00:00
Marek Majkowski 2cfad667d7 msg.Copy() makes a deep-copy of the msg object
There was a copy function that did shallow copies of the msg
object. Export it and make it support proper deep copying.
2014-01-10 08:49:45 -08:00
Marek Majkowski d18d87b37d Introduce msg.PackBuffer() - it's like msg.Pack() but can reuse a byte buffer
msg.Pack() always allocates a byte slice. This is good for simplicity,
but in a serious application it's preferable to reuse byte slices to
reduce the GC overhead. This patch introduces a new public method:
PackBuffer(). It's exaclty like Pack() but is able to reuse a
given byte slice. It will still allocate a new slice if the given one
is too small.
2014-01-10 07:46:24 -08:00
Miek Gieben a627d88e3f Remove stale comments 2014-01-08 10:11:19 +00:00
Miek Gieben 52f9a59ac1 Cleanup singleFlight a bit 2014-01-08 10:10:39 +00:00
Miek Gieben e79b53886c Correct doc 2014-01-07 11:45:40 +00:00
Miek Gieben 1b53a55801 Add todo 2014-01-07 11:17:01 +00:00
Miek Gieben 8e37d3660d Merge branch 'master' of github.com:miekg/dns 2014-01-07 07:45:29 +00:00
Miek Gieben 9f5db7b72c Disable the unfinished CAA support
CAA was partially implemented, it's better to do it 100% until that
time handle CAA as an unknown record.

Closes #70:
2014-01-07 07:44:06 +00:00
Miek Gieben 560a1c65b0 update license in pool.go
remove some build lines as I have no idea what they are
supposed to be doing.
2014-01-06 10:00:25 +00:00
Miek Gieben 86f8bc9fff Merge branch 'master' of github.com:miekg/dns 2014-01-05 20:41:52 +00:00