138 Commits
Author SHA1 Message Date
Alvaro 21a1cd0469 Revert "Background updates for names in the Zone database" 2015-05-26 12:56:44 +02:00
Alvaro Saurin cfcc08a914 Limit the number of answers we provide to users. 2015-05-26 11:30:35 +02:00
Alvaro Saurin 0cb6a6269d Unit tests for multiple IPs through the HTTP API 2015-05-26 10:53:13 +02:00
Alvaro Saurin db0ef5cf5c Remove duplicates in answers 2015-05-26 10:53:13 +02:00
Alvaro Saurin 174b47d1db Shuffle all the replies, not only the ones from the cache... 2015-05-26 10:53:13 +02:00
Alvaro Saurin 87a2886539 Refactored the mocked clock.
Refactored some common code in the Zone lookups
2015-05-26 10:53:12 +02:00
Alvaro Saurin 04e4ef214c Check we can use our mDNS client with our mDNS server 2015-05-26 10:53:12 +02:00
Alvaro Saurin 2783f02790 Make Stop() idempotent 2015-05-26 10:53:12 +02:00
Alvaro Saurin 761eb787ff Unit tests for cache invalidations as a result of names updates 2015-05-26 10:53:12 +02:00
Alvaro Saurin 6fa2f2142f Command line arg for changing the number of background updaters
Default number of background updaters raised to 4
2015-05-26 10:53:12 +02:00
Alvaro Saurin 72b55c82ec Do not invoke the mDNS lookups from the server: they are used from the Zone database now...
Improved DNS server:
- simplify the handlers code, removing duplicated code
- more configuration parameters (eg, we can now disable the cache)
- we can now bind to port 0 and let the server get a free port (so we can get rid of the mess we had in the unit tests...)
2015-05-26 10:53:12 +02:00
Alvaro Saurin fe672eae63 Unit tests for the zone lookups and names updates 2015-05-26 10:53:12 +02:00
Alvaro Saurin 267fddc474 Improved mocks 2015-05-26 10:53:12 +02:00
Alvaro Saurin 2b6388359b Background updates for names 2015-05-26 10:53:12 +02:00
Alvaro Saurin a2dad42ef6 Domain lookups, using mDNS
Added DomainLookup* to the Zone interface
2015-05-26 10:53:12 +02:00
Alvaro Saurin 8a509168ee New zone database 2015-05-26 10:53:12 +02:00
Alvaro Saurin 9c48c83701 Interfaces for the mDNS client and server 2015-05-26 10:53:12 +02:00
Matthias Radestock 52a89a318a cosmetic: resolve yet more linter complaints 2015-05-11 02:44:15 +01:00
Matthias Radestock b43a3e9ab2 cosmetic: resolve some more linter complaints 2015-05-11 02:37:59 +01:00
Matthias Radestock e5a87d1ab1 cosmetic: resolve some linter complaints 2015-05-11 02:31:34 +01:00
Alvaro Saurin ba98135e03 Return NOTIMP for some unimplemented query types, NXDOMAIN otherwise 2015-05-05 21:31:11 +02:00
Alvaro Saurin 3bdfa9b050 Make lint happy 2015-04-28 12:05:24 +02:00
Alvaro Saurin 42fa953053 Minor: logs messages... 2015-04-28 12:05:24 +02:00
Alvaro Saurin 18b7110c31 Stringer'ify some structs 2015-04-28 12:05:24 +02:00
Alvaro Saurin 4aa5e0a97e Minor: logging 2015-04-28 12:05:24 +02:00
Alvaro Saurin ce12b36433 Unit test for multiple answers from a mDNS server 2015-04-28 12:05:21 +02:00
Alvaro Saurin 9e5fe255a5 Improved mocks 2015-04-28 12:02:51 +02:00
Alvaro Saurin d7c154ea41 Removed the "now" parameters and use an external clock provider 2015-04-28 12:02:49 +02:00
Alvaro Saurin 7de2080b9e Added a TTL to the zone records 2015-04-28 11:59:21 +02:00
Alvaro Saurin 22a229c305 Utility function raddrToIP() 2015-04-28 11:52:08 +02:00
Matthias Radestock ce4c79ed93 refactor: extract commonQueryHandler
to remove duplication between queryHandler and rdnsHandler
2015-04-26 12:40:34 +01:00
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