Miek Gieben
29232adf26
better comment
2013-08-31 20:26:24 +01: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
401a5e6429
Add unpack test too
2013-08-26 21:24:06 -07: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
cb9ec711f5
Add (failing) test for zero rdata
2013-08-25 21:38:10 -07:00
Miek Gieben
3f40afaafd
Print the actual error
2013-06-27 20:01:32 +01: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
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
b9f82b0a36
Cherry-pick specific hunks
2013-06-26 20:33:01 +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
f595bf7a06
Set license on test files
2013-05-12 16:09:52 +02:00
Miek Gieben
6bd90e04c3
Fix the test
2013-02-08 16:47:21 +01:00
Miek Gieben
625de563d0
Convert an RR to its unknown representation
2013-01-30 15:55:50 +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
4c6d89f727
PackDomainName: check for 255 or more octects
...
Adhire to the spec.
2012-12-06 10:48:55 +01:00
Miek Gieben
878955c688
fmt
2012-10-15 16:12:37 +02:00
Miek Gieben
9441562d33
Make isSubDomain a faster function for zone
2012-10-15 13:34:29 +02:00
Miek Gieben
ca8b17dda2
Fix the tests
2012-10-09 22:15:33 +02:00
Miek Gieben
3a6edfa2c9
fmt
2012-09-10 20:51:19 +02:00
Miek Gieben
9242855153
fix rest
2012-08-31 10:13:21 +02:00
Miek Gieben
b186f83581
Merge branch 'master' of github.com:miekg/dns
2012-08-30 16:45:30 +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
3076276e48
add test
2012-08-29 08:34:47 +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
8bc979fe1e
make it compile
2012-08-28 13:30:59 +02:00
Miek Gieben
cc1bb251cc
length tests
2012-08-26 22:10:55 +02:00
Miek Gieben
1dffbeeee1
Fix IsSubDomain
2012-08-08 15:16:22 +02:00
Miek Gieben
025d0cecf4
Fix the test: EDNS0 is done completely different
2012-05-31 21:40:49 +02: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
89c05b4f74
gofmt
2012-02-23 19:37:08 +01:00
Miek Gieben
63639e33f8
Add and test IsSubDomain function
2012-02-15 10:22:52 +01:00
Miek Gieben
6ddb9ab88b
Txt record parsing works -- need to look at the on-the-wire stuff
2012-02-12 21:50:02 +01:00
Miek Gieben
0351073d8e
Shorter function for SetUpdate and doc
2012-01-15 16:13:20 +01:00
Miek Gieben
0509df509e
gofmt
2012-01-12 23:17:34 +01:00
Miek Gieben
eb12c526f2
Add more tests
2012-01-11 21:03:47 +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
c64f506103
Remove a packStruct - should improve performance
2011-08-08 15:28:19 +02:00
Miek Gieben
4a8133eabd
Fix the order of the test
2011-08-08 15:12:24 +02:00
Miek Gieben
e21ae18160
Fix the tests too. They fail now btw; its on the TODO
2011-07-08 17:30:04 +02:00
Miek Gieben
70ab2eadb5
Add back the pack/unpack tests
2011-07-04 20:21:01 +02:00
Miek Gieben
8368f4ce60
Actually remove resolver.go
2011-07-04 20:19:44 +02:00
Miek Gieben
3067b91e18
Fix the tests some more -- need to configure it locally for it to work
2011-03-25 14:57:32 +01:00
Miek Gieben
be6f2365cb
Test compile again, but fail
2011-03-23 19:03:37 +01:00
Miek Gieben
7d9a16fbdc
More TSIG stuff
2011-03-14 13:08:54 +01:00
Miek Gieben
920364aae4
Fixes for the testcases
2011-01-26 16:04:51 +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
48cbf55a23
completely fix private key reading
2011-01-17 20:18:51 +01:00