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
3f40afaafd
Print the actual error
2013-06-27 20:01:32 +01:00
Miek Gieben
55aa4480c7
Fix some typos
2013-06-27 19:46:26 +01:00
Miek Gieben
b651c7ea1f
Fix TXT lenght again, but now it looks more right
2013-06-27 14:43:57 +00:00
Miek Gieben
53789814d0
Add benchmarking tests - Len() is ~4 times after then packing and getting a length from that
2013-06-27 09:47:53 +00: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
245be76edf
Revert "Fix length computation for TXT"
...
This reverts commit 795a69a6ec
.
2013-06-26 22:22:31 +01: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
Ray Bejjani
d83e816f30
Changed TestLenCompress to use error inducing name
...
Long labels cause a packing out of bounds error. It is thrown at msg.go:268 in
the PackDomain function. It happens with messages of any construction (no RR
data, some RR data etc.).
2013-06-26 20:38:55 +01:00
Miek Gieben
57fae415e0
Get the testcases going
2013-06-26 20:34:40 +01:00
Miek Gieben
b9f82b0a36
Cherry-pick specific hunks
2013-06-26 20:33:01 +01:00
Ray Bejjani
9d2d8b36eb
SplitDomainName handles non-FQDN labels correctly, doesn't return '.' in parts.
...
SplitDomainName would always include the '.' after each label segment. This was
inconsistent with the "." case (were it returned nil) and didn't seem too useful
since it required more processing to remove the '.' (like when building a
compression dictionary in Msg.Len() or Msg.Pack()). It also had issues with the
last segment, not including it in the split. It now returns all segments,
including the last, irrespective of the label being fully qualified.
A test has also been added to ensure no regressions.
2013-06-25 10:53:30 -07:00
Miek Gieben
070a02c253
Merge branch 'master' of github.com:miekg/dns
2013-06-24 19:05:51 +01:00
Miek Gieben
a04fe67042
Should say udp
2013-06-24 08:44:09 +00:00
Miek Gieben
45640bc8bd
Slightly better documentation
2013-06-24 08:14:30 +00:00
Miek Gieben
83a2c0b789
small tweaks
2013-06-23 21:41:49 +01:00
Miek Gieben
9629b0ce8b
update todo
2013-06-23 21:39:58 +01:00
Miek Gieben
04067bbf85
Fix doc and todo
2013-06-23 21:39:14 +01:00
Miek Gieben
a6268506fd
correct the name
2013-06-23 10:02:32 +01:00
Miek Gieben
d3f1ffa6e8
Tweak
2013-06-22 23:52:22 +01:00
Miek Gieben
8bf7e3c986
Bunch of updates
2013-06-22 21:57:38 +01:00
Miek Gieben
baa7ca4a82
Fix as212 server
2013-06-22 21:40:19 +01:00
Miek Gieben
93c0500dce
Add as212 thingy server as example
2013-06-22 20:40:01 +01:00
Miek Gieben
76db7d1a62
add benchmarking
2013-06-22 09:40:00 +01:00
Miek Gieben
e15a4b1508
Dont downcase when doing IsSubDomain, let the caller decide
2013-06-22 09:26:20 +01:00
Miek Gieben
5ae9b5214f
more testing and concurrent server benchmarking
2013-06-22 08:55:30 +01:00
Miek Gieben
9762efef1e
Use new names
2013-06-22 08:48:26 +01:00
Miek Gieben
2b65c92022
Merge branch 'master' of github.com:miekg/dns
2013-06-22 08:45:58 +01:00
Miek Gieben
bb732937a2
Add Benchmarking functions
2013-06-22 08:40:02 +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
74a0da119d
Uh uppercase it here too
2013-06-21 15:31:19 +00:00
Miek Gieben
ef73958b14
Make nextLabel public
2013-06-21 15:23:31 +00:00
Miek Gieben
9640d43c82
Make SplitLabels use Split
2013-06-21 15:17:12 +00:00
Miek Gieben
939abbfea7
Re-arrange some comments
2013-06-21 08:53:24 +00:00
Miek Gieben
45eff721ce
Add the beginning of a AS212 server
2013-06-20 20:52:55 +00:00
Miek Gieben
a16b289765
Add todo
2013-06-20 20:36:13 +00:00
Miek Gieben
9e544160e4
Fixo
2013-06-20 14:24:53 +00:00
Miek Gieben
1d22bfdb4d
Add more efficient label test functions
...
Also add tests for it.
2013-06-20 14:24:14 +00:00
Miek Gieben
d526e0beee
Merge branch 'master' of github.com:miekg/dns
2013-06-20 13:26:09 +00:00
Miek Gieben
cb1a259368
Add the first of faster/mem eff. labsl functions
2013-06-20 07:49:18 +01: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
667f7eb216
Added
2013-06-19 15:22:55 +00:00
Miek Gieben
76dd2f8220
Merge pull request #45 from deweerdt/master
...
Add a panic clause to fix 'missing return' error
2013-06-18 10:57:52 -07:00
fdeweerdt
6de33f30fe
Fix 1.1.1 missing return error
2013-06-18 10:38:14 -07:00
Miek Gieben
11d592bfa7
client.Retry does not do anything
...
Remove from the struct as it was not implemented.
2013-06-15 20:35:09 +01:00
Miek Gieben
d171a352d9
Small fix for go < 1.1 versions
2013-06-15 18:27:52 +01:00
Miek Gieben
5d094e6e2d
gofmt
2013-06-14 19:42:55 +01:00
Miek Gieben
b697d25ed9
Remove unneed string conversion here
2013-06-14 11:38:04 +00:00