Commit Graph
16 Commits
Author SHA1 Message Date
Michael Bridgen 156314a802 Complete multicast requests on first response
This is the simplest thing that works, is consistent with what happens
if there's a local answer, and avoids having all multicast requests
last 250ms or more.

Since we're no longer waiting *at least* the timeout period, I've
bumped the multicast response timeout up to half a second.

There was also a bug whereby the query would be entered into the
inflight map even if the socket write had failed (and the channel had
been closed).
2014-10-22 13:35:40 +01:00
Michael Bridgen 6eb7d71499 Substituted checkFatal for repeated if err == nil 2014-10-21 13:58:12 +01:00
Michael Bridgen 337919d741 Replaced ad-hoc printf with log levels 2014-10-20 18:18:16 +01:00
Michael Bridgen d3d07deec6 Changed local domain handling
1. The local domain is now ".weave.local", which is safer from TLD
 pollution
 2. If the name given for an IP isn't a subdomain of the local domain,
 ignore it
2014-10-20 18:11:14 +01:00
Bryan Boreham bce06d2e9b Wait for interface in main 2014-10-20 17:26:11 +01:00
Bryan Boreham b8a06521c0 Extract interface util functions to their own file 2014-10-20 17:21:35 +01:00
Bryan Boreham 3af058481e Support returning AAAA records from delegated DNS queries 2014-10-20 17:18:17 +01:00
Bryan Boreham 624db7bdff Replace hard-coded 4 with const for channel size 2014-10-20 16:59:39 +01:00
Bryan Boreham 81c5690329 Hoist WriteMsg calls up 2014-10-20 15:00:59 +01:00
Michael Bridgen 0749460652 Moved updater into server
While we're only reacting to containers going away, it's more
convenient to bundle the docker events watcher into the server.

I've added a flag to switch it on; and switched it on by default in
the container.

I also implemented `Zone.DeleteRecordsFor(ident)`, which removes all
records for a particular container.

One minor change to the structure of the code is that the Zone is now
constructed *outside* the server, and given to it and the updater.
2014-10-16 15:38:32 +01:00
Bryan Boreham 50d343e2fb Use specified port for http listener 2014-10-10 17:36:46 +01:00
Bryan Boreham ed6c7cb784 Concatenate multiple replies received over mDNS 2014-10-10 17:14:06 +01:00
Bryan Boreham 8521fdea0e Reply with array of addresses for delegated query 2014-10-10 16:31:09 +01:00
Bryan Boreham b5214f65e7 Forward DNS requests that aren't for our 'weave' domain 2014-10-10 15:41:09 +01:00
Bryan Boreham de65dc7996 Move usage of mdnsClient after initialization 2014-10-10 15:34:54 +01:00
Michael Bridgen b1b75c4a8a Moved the server startup code out of main.go 2014-10-10 11:53:21 +01:00