Commit Graph

3155 Commits

Author SHA1 Message Date
Miek Gieben 67945c119e A bunch of golint fixes
The proposed vars names are a nono, because they break the API.
Things left: document each RR and zscan_rr.go has some funcky if-then-elses.
2015-02-19 09:58:33 +00:00
Miek Gieben bd61ec4278 Merge pull request #182 from mattf/tpyo
fix spelling of separate
2015-02-18 22:09:11 +00:00
Matthew Farrellee 24ccdb3008 fix spelling of separate 2015-02-18 17:04:12 -05:00
Miek Gieben b5baec579b Cleanup travis.yml 2015-02-18 09:27:35 +00:00
Miek Gieben c7458158f0 Fix travis, gvm is gone? 2015-02-18 09:23:34 +00:00
Miek Gieben 48ba40204d Add some more binary tests in TestMsgPackBuffer 2015-02-18 09:17:00 +00:00
Miek Gieben b65f52f3f0 Merge pull request #179 from DanielMorsing/copyarr
Used shared backing array for Msg.Copy
2015-02-05 14:19:54 +00:00
Daniel Morsing a4af4dd14e Used shared backing array for Msg.Copy
If you have a system with large amounts of copies, these slice
allocations start stacking up. Use a shared slice and then subslice
them with a cap limit so that append works properly.

Also, add a benchmark and test for Msg.Copy

Benchcmp:
benchmark         old ns/op     new ns/op     delta
BenchmarkCopy     1880          1672          -11.06%

benchmark         old allocs     new allocs     delta
BenchmarkCopy     13             11             -15.38%

benchmark         old bytes     new bytes     delta
BenchmarkCopy     528           528           +0.00%
2015-02-05 13:07:07 +00:00
Miek Gieben dfa09b604c Very small cleanups 2015-02-04 06:55:03 +00:00
Yann Kerhervé 80d2db2e86 Fix ignored last line of resolv.conf
When ClientConfigFromFile is given a file that is missing a newline
before EOF, then the last directive is completely ignored.

This also adds a very basic test for a normal resolv.conf parsing.
2015-02-03 16:27:39 -08:00
Miek Gieben a76c0a363d Merge branch 'master' of github.com:miekg/dns 2015-01-27 08:20:08 +00:00
Miek Gieben 50890090cb Merge branch 'ipseckey'
Tentatively merging.
2015-01-27 08:17:50 +00:00
Miek Gieben ca7706307e Merge pull request #177 from StalkR/dns-reverse-proxy
README: update Users: StalkR/misc/dns/proxy moved to its own repo
2015-01-26 10:29:39 +00:00
StalkR 48aa88a987 README: update Users: StalkR/misc/dns/proxy moved to its own repo at StalkR/dns-reverse-proxy 2015-01-25 18:39:30 +01:00
Miek Gieben b6ff23905a Finish implementing IPSECKEY
Remaining tests and unpack for IPSECKEY.
2015-01-25 12:24:39 +00:00
Miek Gieben 3244eb7baa Merge pull request #173 from FiloSottile/privkey_refactor
PrivateKey refactor
2015-01-25 12:08:34 +00:00
Miek Gieben 477cb4d3fa Implement IPSECKEY
IPSECKEY is kinda strange because it has a type selector which tells
what type a later rdata field has. The type can be a domainname, address
or v6 address. You sort of wish Go would have a union type for this, but
alas.
Currently this is implemented as:

	GatewayA    net.IP `dns:"a"`
	GatewayAAAA net.IP `dns:"aaaa"`
	GatewayName string `dns:"domain-name"`

In the IPSECKEY. Only one of these is active at any one time. When
parsing/packing and unpacking the value of GatewayType is checked
to see what to do.

Parsing from strings is also implemented properly and tested. The Unpack
function still needs work.
2015-01-25 10:58:30 +00:00
Filippo Valsorda 3035815b29 Reorder DNSSEC code 2015-01-23 13:06:08 -08:00
Filippo Valsorda e9faa971b3 Refactor the DNSSEC private key code
Now PrivateKey is an interface exposing Sign() and String(). Common
implementations are wrappers for {rsa|dsa|ecdsa}.PrivateKey but
this allows for custom signers, and abstracts away the private-ops
code to a single place.
2015-01-23 13:04:29 -08:00
Miek Gieben 7f65f12951 Merge pull request #175 from flebarbe/master
Add support for HmacSHA512 algorithm in TSIG
2015-01-23 10:05:14 +00:00
Flavien Lebarbe 067cfe8d4e Add support for HmacSHA512 algorithm in TSIG 2015-01-23 10:51:56 +01:00
Miek Gieben 3fcd28bab1 Merge branch 'master' of github.com:miekg/dns 2015-01-23 07:16:05 +00:00
Miek Gieben ebbe30ad4e axfr test is flaky
Off for now: can be turned on, but we need to up a local server
and xfr from there.
2015-01-23 07:15:26 +00:00
Filippo Valsorda 3fd8a8eef6 Fix: RSA key export and its test 2015-01-22 22:02:20 -08:00
Miek Gieben f2aff624fc Fix SetIxfr
Making a ixfr message requires a complete SOA. Add to paramaters
to SetIxfr: Ns and Mbox that will be used in the SOA in the msg.
2015-01-22 09:01:49 +00:00
Miek Gieben 2efce5c9e0 Short tests 2015-01-21 18:26:30 +00:00
Miek Gieben d344ff065b Move all AXFR tests to their own file 2015-01-21 17:37:20 +00:00
Miek Gieben 7232d0cce1 Merge branch 'master' of github.com:miekg/dns 2015-01-16 07:48:51 +00:00
Miek Gieben 33e6f6fe1b Add dnsproxy as a project 2015-01-16 07:48:43 +00:00
Miek Gieben 68de7327c0 Merge pull request #172 from StalkR/second
minor clean ups: use time.Second instead of 1e9
2015-01-15 22:17:04 +00:00
StalkR fe160dfba4 minor clean ups: use time.Second instead of 1e9, do not reference ns as time.Duration is enough 2015-01-15 23:11:11 +01:00
Miek Gieben 22cf53fe1e Merge pull request #171 from StalkR/xfr
xfr: Transfer.Out use a new Msg every time
2015-01-15 13:00:16 +00:00
StalkR 1d1dad9498 xfr: Transfer.Out use a new Msg every time 2015-01-15 13:07:26 +01:00
Miek Gieben 06484909b2 Merge pull request #170 from StalkR/sync
xfr: make Transfer.Out synchronous
2015-01-15 10:43:15 +00:00
StalkR cf4c9a358e xfr: make Transfer.Out synchronous 2015-01-15 11:39:47 +01:00
Miek Gieben 2c80cd7c5c Merge branch 'format' 2015-01-13 16:40:23 +00:00
Miek Gieben 3431a56aac Typo in comment 2015-01-13 16:21:24 +00:00
Miek Gieben cd839f929c Merge branch 'master' of github.com:miekg/dns 2015-01-13 14:59:50 +00:00
Miek Gieben f5bc1323a1 update.go: make RemoveRRset as dumb as the rest.
The RemoveRRset method was the only one that had a check for RRsets.
While adding multiple identical RRs is an error, there should be now
check for that at this level.
2015-01-13 14:40:53 +00:00
Miek Gieben 733a2d3822 Remove code, fix doc and fix test 2015-01-13 11:43:57 +00:00
Miek Gieben 7777789184 Some remarks on wks 2015-01-13 10:39:13 +00:00
Miek Gieben aa1047c551 Remove format test 2015-01-13 10:21:50 +00:00
Miek Gieben 5d8dbab4c8 Remove the fmt Formatters
Formatters are not needs you can access the members just fine.
However the rdata Field access function are handy and non-trivial,
extend them and add a basic test.
2015-01-13 10:20:34 +00:00
Miek Gieben 2b6f0d61e5 When locking *do* unlock
Add unlocking to some more places as pointed out by bronze1man.

Really closes #161.
2015-01-13 08:12:02 +00:00
Miek Gieben 9c3a117004 Add some more string conversion 2015-01-12 22:33:49 +00:00
Miek Gieben 59ad100e22 Need to implement some more verbs as well 2015-01-12 09:54:56 +00:00
Miek Gieben a8e252952e Doc tweaks 2015-01-11 22:15:41 +00:00
Miek Gieben 735efcbd10 Allow access (as strings) to the rdata of each RR 2015-01-11 21:01:54 +00:00
Miek Gieben 74b8577dc6 Better docs 2015-01-11 18:03:32 +00:00
Miek Gieben 1e8afcf787 Fix the tests, add the %s verb as well 2015-01-11 17:55:39 +00:00