Commit Graph
13 Commits
Author SHA1 Message Date
Michael Bridgen db9bae4162 Use the fallback for reverse lookups too
I considered a couple of different factorings, that is

 * Implementing the fallback as a Lookup
 * Having a server struct that held the resolv.conf and methods for
   handling queries

but ultimately, this is simple and works.
2015-01-14 16:44:12 +00:00
Michael Bridgen ff45bcf945 Change Lookup method names
The Local was redundant (and inaccurate in the case of the mDNS client
implementation), and otherwise they are too nondescript.
2015-01-12 17:42:23 +00:00
Michael Bridgen 5f642d390c Pass queries for non-local names on to the configured nameserver 2015-01-12 17:12:15 +00:00
Michael Bridgen b114735a41 Reform logging in weaveDNS
* Put prefixes (including msg IDs) in front of log messages to
   distinguish them
 * Failed lookups get logged under Info as per issue #311
 * More accurate messages as per issue #311
2015-01-09 12:49:07 +00:00
Bryan Boreham bd2844d186 Split http-startup code from server-startup 2015-01-08 18:38:38 +00:00
Michael Bridgen bf752d2d1f Implement zone lookup with MDNSCLient
This separates Zone into the DB ops and the Lookup ops, and implements
the latter for MDNSClient so it can be used just like the zonedb.

A notable change is that Lookup methods only ever return one result,
while MDNSClient.SendQuery could in theory return multiple results
(though it wouldn't, because no server would supply more than one
result in a response, and it stops waiting after getting one response
..).

ReverseLookupLocal is implemented even though no MDNSServer will
answer at present (hence no test yet).

Lastly, the handler (creating) functions can now be given a list of
Lookup implementations to try in order.
2015-01-08 13:39:33 +00:00
Michael Bridgen 3866bd5e63 Parse reverse address lookup IPs in the Zone
.. rather than making clients of the zone do it. At the minute there's
only one call site, but soon there will be more.
2015-01-08 13:39:33 +00:00
Bryan Boreham 82b54aabcd Move logging, updating and testing utils into common directory 2015-01-02 14:49:49 +00:00
Matthias Radestock 2680e594dd rename 2014-11-28 16:27:11 +00:00
Matthias Radestock 3cb6f1b3cc handle AAAA queries for external IPs
Closes #188.
2014-11-17 12:25:46 +00:00
Matthias Radestock fda412a151 refactor: rename badly named function
makeAddressReply handles both A and AAAA records
2014-11-17 12:06:06 +00:00
Michael Bridgen 822ec90606 Rename weavedns package to nameserver, and fix up 2014-10-29 11:41:58 +00:00
Michael Bridgen 8469fea215 Move files around in preparation for melding into weave code
* library code will go in weave/nameserver/
 * main.go for the server goes in weavedns/ with the containerising
2014-10-29 11:34:56 +00:00