Commit Graph

3622 Commits

Author SHA1 Message Date
Nick Owens cbc47172cd fix building on plan9 2016-03-21 12:27:12 -07:00
Miek Gieben f8964231a8 Merge pull request #333 from matje/issue-316-rdlen-2
Len returns the rr len of the uncompressed format.
2016-03-17 14:31:27 +00:00
Matthijs Mekking 5107215070 Len returns the rr len of the uncompressed format. 2016-03-17 15:07:51 +01:00
Miek Gieben b9171237b0 Merge pull request #329 from miekg/tsig-lowercase
TSIG: lowercase algorithm before use
2016-03-08 07:08:06 +00:00
Miek Gieben b6897b5a7c TSIG: lowercase algorithm before use
These strings are domain names, so we should lowercase them before
using them.

Also add some tests for Tsig generation and verification.

(/ht ldns release).
2016-03-07 22:17:28 +00:00
Miek Gieben 4adf880b02 Merge pull request #327 from miekg/better-docs-for-larger-responses
Better docs on client buffer size
2016-03-02 10:42:01 +00:00
Miek Gieben 4a3ac71278 Better docs on client buffer size
Extend the documentation for Exchange to make it clear that it is
the callers responsibility to enable larger buffers.
2016-03-02 09:40:40 +00:00
Miek Gieben cce6c130cd Merge pull request #325 from miekg/issue-324
Issue 324
2016-02-28 19:27:08 +00:00
Miek Gieben aabc5a63e1 better comment 2016-02-28 16:40:28 +00:00
Miek Gieben 0985f1e8ff Fix TCP rtt
TCP wasn't returning rrt info anymore, fix this. Also add
an issue_test.go where fixes for specific issues can be put.

Pull the rtt for udp message up into the function where we now
also set the rrt for tcp (for symmetry).
2016-02-28 16:36:19 +00:00
Miek Gieben 2403d251d5 Add specific test file for fixing issues 2016-02-28 16:15:32 +00:00
Miek Gieben d9472276a1 Merge pull request #321 from miekg/issue-306-improve-docs
Improve docs on the label functions
2016-02-28 08:40:12 +00:00
Miek Gieben 84e9295e47 Improve docs on the label functions
Explicitly mention that the domain s must be valid before
given it to these functions.

Fixes: 306
2016-02-28 08:37:17 +00:00
Miek Gieben c793f401f5 TestPreReqAndRemovals should become Example
Add comment in the test function that this should be reworked
once #323 is fixed.
2016-02-28 08:33:08 +00:00
Miek Gieben 8e0dddcdbd Merge pull request #320 from middelink/master
Fix code around dynamic updates, allowing for multiple prereq/inserts/removals per update
2016-02-27 20:00:17 +00:00
Pauline Middelink 5fc21d26a1 Updates after comments from miekg. 2016-02-27 13:02:32 +01:00
Pauline Middelink 13a6137d79 An update msg can have multiple, different prerequests and also multiple,
dfferent remove and inserts. The old code did a reset of the ANSWER and
AUTHORITY section each time a rrset was added.

Made a slight optimalisation that the first time an rrset is added, we
take it length as the initial size. Helps for the one-time add cases.

Added test to prevent regressions.
2016-02-27 12:58:10 +01:00
Miek Gieben f89e57ed50 Merge pull request #318 from middelink/master
Missing dot between service and protocol.
2016-02-27 10:51:16 +00:00
Pauline Middelink 77b60828ed Missing dot between service and protocol. 2016-02-27 11:15:15 +01:00
Miek Gieben 905106d0e8 Merge branch 'master' of github.com:miekg/dns 2016-02-22 19:20:54 +00:00
Miek Gieben 8fc9caa888 Go 1.6 for travis 2016-02-22 19:20:48 +00:00
Miek Gieben e0d84d97e5 Merge pull request #310 from turtlemonvh/master
Add consul to list of users on README
2016-02-13 09:14:50 +01:00
Timothy e937df22c0 Add consul to list of users on README
Proof: https://github.com/hashicorp/consul/blob/master/command/agent/dns.go
2016-02-12 16:41:29 -05:00
Miek Gieben 83f7d658ac Merge pull request #309 from corny/patch-1
README: public-dns has moved
2016-02-05 09:40:07 +00:00
Julian K 4d05cbc9ba README: public-dns has moved 2016-02-03 19:53:21 +01:00
Miek Gieben 3d66e3747d Merge pull request #307 from everclear/patch-1
New user added
2016-01-29 16:34:59 +00:00
everclear b633e89c58 New user added 2016-01-29 16:26:44 +00:00
Miek Gieben 4687536c72 Merge pull request #302 from TomOnTime/tlim_newstuff
Added new functions: TrimDomain(), AddDomain().
2016-01-25 17:15:38 +00:00
tal@whatexit.org 808f9308ef Added new functions: TrimDomainName()/AddOrigin()
* TrimDomainName() Trims the domain off a FQDN.
  * AddOrigin() Adds a domain to a shortname or leaves a FQDN alone.
2016-01-25 12:08:29 -05:00
Miek Gieben c144371d31 Merge pull request #305 from shawnps/patch-3
typo
2016-01-24 07:46:31 +00:00
Shawn Smith 4d6d450eed typo 2016-01-23 15:39:59 -08:00
Miek Gieben 5c01f20c3a Merge pull request #304 from shawnps/gofmt
gofmt -s
2016-01-23 08:13:56 +00:00
shawnps 0cea3842b9 gofmt -s 2016-01-22 08:44:49 -08:00
Miek Gieben 85b661b2a6 Merge pull request #303 from client9/master
minor spelling corrections
2016-01-20 07:47:41 +00:00
Nick Galbreath a7f8fcc762 spelling 2016-01-19 14:24:18 -08:00
Nick Galbreath 5cbabd2322 spelling 2016-01-19 14:23:11 -08:00
Miek Gieben 297a77c2fb Merge pull request #300 from rafaeljusto/dns-over-tls
DNS over TLS
2016-01-11 18:45:12 +00:00
Rafael Dantas Justo ad79b3f5fb Change documentation based on @miekg comments
See #297
2016-01-11 08:40:14 -02:00
Rafael Dantas Justo 72c041d2f5 Create new function ListenAndServeTLS to easy run a DNS server with TLS support
Using the ListenAndServe with network as "tcp-tls" will cause an error, as the
certificates weren't informed. To solve that we created the function
ListenAndServeTLS that will configure a DNS server listening TCP and handling
requests on incoming TLS connections.

See #297
2016-01-08 13:20:22 -02:00
Rafael Dantas Justo a9978c4481 Add new feature to documentation
See #297
2016-01-08 11:34:38 -02:00
Rafael Dantas Justo 97f81a2cb5 Test client with TLS support
See #297
2016-01-08 11:34:08 -02:00
Rafael Dantas Justo 6fe70412bc Add option in server to allow DNS over TLS
We should allow the server to receive requests of an encrypted connection. This
is proposed on the document draft-ietf-dprive-dns-over-tls [1].

Now it is possible to initialize the DNS server to listen with TLS using
"tcp-tls" value in network parameter of ListenAndServe function, or passing a
listener initialized with tls.Listen to ActivateAndServe.

There's also an option in Server type to change the TLS confirguration, to
inform the certificates that are going to be used, or to change any other
desired option of tls.Config.

See #297

[1] http://tools.ietf.org/html/draft-ietf-dprive-dns-over-tls-02
2016-01-08 11:26:13 -02:00
Rafael Dantas Justo 91335a81cf Change how we enable DNS over TLS option
We are removing the TLS atributte from Client type. Now if you want to enable
DNS over TLS you should use the value "tcp-tls", "tcp4-tls" or "tcp6-tls" in
Net attribute.

See #297
2016-01-08 11:21:03 -02:00
Rafael Dantas Justo 5028d33048 Merge branch 'dns-over-tls' of github.com:rafaeljusto/dns into dns-over-tls 2016-01-08 07:28:41 -02:00
Rafael Dantas Justo ab77ae6734 Remove the TLS fallback strategy
After some thoughts, I realized that the fallback should be made by who is
using the client, as it will need to change the port (from 853 to 53). This
would also remove from the library the complexity of storing the recursive
nameservers that aren't working well with TLS (draft-ietf-dprive-dns-over-tls,
section 3.1).

See #297
2016-01-08 07:28:05 -02:00
Rafael Dantas Justo 1c62bb2781 Remove the TLS fallback strategy
After some thoughts, I realized that the fallback should be made by who is
using the client, as it will need to change the port (from 853 to 53). This
would also remove from the library the complexity of storing the recursive
nameservers that aren't working well with TLS (draft-ietf-dprive-dns-over-tls,
section 3.1).

Resolves #297
2016-01-07 13:36:36 -02:00
Rafael Dantas Justo 020f925824 Change low level read/write for TLS connection
As tlc.Conn is just a TCP connection after the handshake, we will modify the
TCP functions to work with an io.Reader/io.Writer parameter instead of a
net.TCPConn so we can reuse them.

See #297
2016-01-07 13:27:07 -02:00
Rafael Dantas Justo 124839738d Fallback to normal connection if TLS fails
As described in document draft-ietf-dprive-dns-over-tls [1] we should fallback
to normal connection (without TLS) if there's any error with the TLS
connection.

See #297

[1] http://tools.ietf.org/html/draft-ietf-dprive-dns-over-tls-02
2016-01-04 10:49:20 -02:00
Rafael Dantas Justo ce3e1286f2 TLS connection must be via TCP
See #297
2016-01-04 10:46:14 -02:00
Rafael Dantas Justo 72d475a8fe Allow changing the default TLS configuration
When starting a TLS connection in some environments, we usually disabled some
certificates checks to allow tests with self-signed certificates. To disable
this checks we need to change some TLS parameters when starting a connection,
and for that we need to inject this parameters in the API.

Now the Client will also have an attribute for the TLS configuration
parameters. For future refactories, we could change the TLS attribute from bool
to a struct that would store the "Enable" flag and the configuration.

See #297
2016-01-04 10:30:39 -02:00