307 Commits
Author SHA1 Message Date
Matthias Radestock cb42ec358e even more alignment between queryHandler and rdnsHandler
in preparation of extracting common helper function
2015-04-26 11:40:28 +01:00
Matthias Radestock 1a35b5aa2b align queryHandler and rdnsHandler
increasing their similarity in preparation of refactor
2015-04-26 11:20:44 +01:00
Alvaro Saurin 41ae6e0b7a Make "go vet" happy 2015-04-23 13:01:29 +02:00
Alvaro Saurin 56859a9c30 Run gofmt 2015-04-23 13:01:29 +02:00
Alvaro Saurin 58c8945b32 Support "insistent" queries in the mDNS client, used for obtaining all possible responses from mDNS servers.
Support for multiple responses from Lookup*() methods
Support for multiple records when building packets with make*() methods
Use a common "ZoneRecord" interface for structs that contain names and IPs
2015-04-23 13:01:29 +02:00
Tom Wilkie f735082d95 Fix gofmt errors in nameserver. 2015-04-17 11:42:29 +00:00
Adam Harrison 7f434d71e1 Merge pull request #532 from inercia/weave-225-fix-2
Fix in WeaveDNS: do not modify cache when getting a reply
2015-04-13 14:20:40 +01:00
Adam Harrison 29b3b91423 Merge pull request #501 from inercia/weave-225-fix-1
Fix for negative TTLs in WeaveDNS
2015-04-13 14:19:47 +01:00
Matthias Radestock 065b632f91 significantly reduce time for test dns servers to shut down
by setting the ReadTimeout to 100ms instead of the default 2s.

Closes #547.
2015-04-11 20:52:51 +01:00
Matthias Radestock e0bba10ead better handling of test multicast listener initialisation errors
We handle that error explicitly in all cases and point out the common
cause, namely the absence of a default multicast interface.

Closes #481.
2015-04-11 20:22:41 +01:00
Matthias Radestock bb99b21248 tiny refactor: make use of helper function 2015-04-11 19:09:41 +01:00
Bryan Boreham d32f328c24 Simplify printing 2015-04-10 14:46:31 +01:00
Alvaro Saurin 7811e2b470 Improved log messages 2015-04-09 16:19:05 +02:00
Alvaro Saurin 5d5b101707 Set locally resolved queries as Authoritative 2015-04-09 16:19:05 +02:00
Alvaro Saurin 186481052d Catch unsupported queries by using the cache 2015-04-09 16:18:55 +02:00
Alvaro Saurin 2474adb2c5 Do not modify the TTL stored in the cache when getting a reply from the cache 2015-04-09 16:17:24 +02:00
Alvaro Saurin 6f545a4296 Fix for negative TTLs by using a different lookups set depending on the value stored in the cache. 2015-04-09 16:17:19 +02:00
Bryan Boreham 8a82f368d0 Update repository name from zettio to weaveworks 2015-04-08 16:35:52 +01:00
Bryan Boreham 68096b0437 Generalize updater.go 2015-04-01 16:48:11 +01:00
Matthias Radestock 10f37db9da tidy up DNSServer fields
- make Zone, Iface and Upstream public - this is safe and makes sense
  since all are immutable, and the former two are passed to the
  constructor and are thus known anyway, and the latter is derived
  from external information
- remove IfaceName - we can just use Iface instead
- log Upstream on startup
2015-03-31 12:04:31 +01:00
Matthias Radestock 2500bc210a cosmetic: more linting 2015-03-27 01:21:36 +00:00
Matthias Radestock 1ad950f177 cosmetic: more linting 2015-03-27 01:12:16 +00:00
Matthias Radestock 2d83fcc398 oops 2015-03-26 18:37:37 +00:00
Matthias Radestock 44a4dd9888 cosmetic: go vet 2015-03-26 18:36:00 +00:00
Bryan Boreham 7a4a88aeb9 Remove unused unnamed second item in ranges 2015-03-26 18:04:57 +00:00
Matthias Radestock 45740b1419 refactor: replace buf.WriteString(fmt.S*(...)) with fmt.F*(&buf,...)
shorter and more efficient
2015-03-26 14:20:28 +00:00
Matthias Radestock e7335f361c refactor: move a func that is only used in testing 2015-03-26 13:53:09 +00:00
Adam Harrison efb7c0f1bc gofmt 2015-03-26 10:54:46 +00:00
Adam Harrison 066d8001dd Merge pull request #482 from rade/475-simplify-actors
simplify actors
2015-03-25 11:58:41 +00:00
Matthias Radestock 0e43a30858 convert MDNSClient actor to use closures for methods
We use a 'nil' closure to indicate shutdown.
2015-03-25 05:14:17 +00:00
Michael Bridgen 075d9a007c Merge branch 'weave-225' of https://github.com/inercia/weave into pr429 2015-03-24 16:47:38 +00:00
Matthias Radestock 8c3b161bd3 cosmetic 2015-03-24 14:41:20 +00:00
Alvaro Saurin 9dcec8ca16 basic DNS cache
unit tests
2015-03-24 12:44:01 +01:00
Michael Bridgen f64876a64b Increment the server port for each test
Occasionally the test servers overlap and the test will fail with
"address already in use".
2015-03-23 12:02:43 +00:00
Adam Harrison fcab4ee239 Truncate container IDs to twelve characters 2015-03-18 17:56:58 +00:00
Adam Harrison d23a6c86c3 Merge branch 'master' into 237_add_dns_to_weave_status
Conflicts:
	nameserver/http.go
2015-03-18 11:58:39 +00:00
Adam Harrison bae6865e33 Rename URL parameter 2015-03-18 11:45:04 +00:00
Adam Harrison bd7b232663 Replace hand parsing and validation of URLs with Gorilla mux 2015-03-18 10:10:13 +00:00
Adam Harrison 8f675f15c0 Revert Gorilla mux introduction 2015-03-17 17:52:39 +00:00
Adam Harrison 0f492b563e Fix test compilation
Tests weren't compiling due to change of ListenHttp() signature. Fixed
for now by reintroducing domain parameter in addition to server, as this
allows the HTTP tests to pass in a nil server parameter. In the long
term DNSServer should probably become an interface so we can mock it
easily in such a scenario.
2015-03-17 17:42:16 +00:00
Adam Harrison c36543a247 Include DNS server config in status 2015-03-17 15:41:01 +00:00
Adam Harrison 6f57774d15 Include zone records in status 2015-03-17 15:02:09 +00:00
Adam Harrison 50f6402774 Include DNS version and domain in status 2015-03-17 14:28:26 +00:00
Adam Harrison 9ce26e6973 Replace hand parsing and validation of URLs with Gorilla mux 2015-03-17 13:49:26 +00:00
Matthias Radestock 123e8bbb28 reduce likelihood of IP clashes in tests & examples
by using the 10.2 range, which is not one used by docker and also is
less likely than 10.0 to be used by something else.

Fixes #402.
2015-03-09 20:51:26 +00:00
David Wragg cda6b8d582 Fix a few deviations from go fmt 2015-03-05 13:56:21 +00:00
Matthias Radestock 6c82f781cd trim some logging from tests 2015-03-02 17:02:10 +00:00
Matthias Radestock 6d69ac5532 refactor and tweak dns tests
- extract helper function
- use "lots and lots of MX records" instead of "lots of TXT records"
  for testing large response
- calculate on the fly the number of records we need to generate a
  large response
- don't hardcode "weave.works"
2015-03-02 16:56:10 +00:00
Alvaro Saurin 4682f7ed95 zettio/weave#366 - removed reference to DNSServerConfig in the DNSServer struct 2015-02-27 15:40:32 +01:00
Alvaro Saurin 007873a402 zettio/weave#366 - keep the DNSServerConfig inmutable 2015-02-27 12:22:08 +01:00