Commit Graph
276 Commits
Author SHA1 Message Date
Alvaro Saurin 7992bf4177 DNS upstream servers report 2015-11-19 14:54:23 +01:00
Matthias Radestock dc9f8762ca move generic communication substrate into its own 'mesh' package
This is mostly a matter of moving some files, changing package names,
changing some imports, and changing some type references.

We duplicate the odd constant & global var, and the intmac/macint
functions, since neither 'router' or 'mesh' nor, really,' common' are
a natural home for them.
2015-11-09 16:37:39 +00:00
Adam Harrison abc653c87d Fix merge breakage 2015-11-03 10:13:43 +00:00
Matthias Radestock 30a128c00b Merge branch '1.2' 2015-11-02 20:58:15 +00:00
Bryan Boreham b80c1343c3 Take steps to avoid the test timing out 2015-11-02 20:40:17 +00:00
Bryan Boreham e5c5fbcea3 Hold on to the lower-case version of a hostname, rather than re-computing it every time 2015-11-02 20:40:05 +00:00
Bryan Boreham fc7d04ce73 Condense Entries unit tests with helper function 2015-11-02 20:03:10 +00:00
Bryan Boreham 35f57b3ed2 Move decoding code next to encoding code 2015-11-02 20:01:40 +00:00
Bryan Boreham ed9ade05ea Improve merge asserts 2015-11-02 20:01:40 +00:00
Bryan Boreham f485b729bc Hold all entries sorted case-insensitively until just before sending, when we re-sort case-sensitively in Encode() 2015-11-02 20:01:40 +00:00
Bryan Boreham 64f7953423 Add unit test to check outbound mixed-case merging 2015-11-02 20:01:40 +00:00
Bryan Boreham fc1d837501 Extend unit test to cover mixed-case hostnames and daisy-chained gossip;
reduce mock gossip timer to 2 seconds to trigger more often during tests.
2015-11-02 20:01:40 +00:00
Matthias Radestock 6a238818da Merge branch '1.2' 2015-11-02 19:58:37 +00:00
Matthias Radestock 9800c43bfa refactor(ish): don't use reference in method that doesn't modify 2015-11-02 19:57:17 +00:00
Adam Harrison c3a53a6ec5 Merge remote-tracking branch 'upstream/1.2' 2015-11-02 15:21:06 +00:00
Adam Harrison f64f63f675 Handle truncated responses from upstream servers 2015-11-02 15:00:02 +00:00
Adam Harrison f0fb44f6d4 Update unit test for miekg DNS API change 2015-11-02 13:24:04 +00:00
Matthias Radestock 12f5ec40b5 refactor: reduce coupling of nameserver to router
The nameserver no longer knows anything about router.Peers and
router.Peer. That only leaves PeerName, Gossip and GossipData.
2015-10-29 23:21:07 +00:00
Adam Harrison 7408f72de2 Check weaveDNS subdomain on REST PUT 2015-10-27 14:37:57 +00:00
Matthias Radestock 14a5c12404 allow router to be run w/o access to Docker
Fixes #1443.
2015-10-03 17:52:57 +01:00
Tom Wilkie 357174e351 DNS lookups should not be case sensitive.
- On-the-wire gossip messages are sorted case sensitive, but in memory they are sorted case-insensitive.
- Add test for case insensitive match on multiple names.
2015-10-01 12:19:49 +00:00
Matthias Radestock 725f99ea4c Merge branch '1.1' 2015-10-01 08:23:52 +01:00
Tom Wilkie 11d93b1883 Fix races in TestRecursiveCompress 2015-09-30 15:51:07 +00:00
Bryan Boreham 81e8ba223f Do network attach on docker event rather than intercepting start and restart commands.
This means it also works when the docker daemon restarts a container.
2015-09-01 17:48:12 +01:00
Matthias Radestock 6655974ef3 cosmetic: tidy up log messages 2015-08-28 09:12:42 +01:00
Tom Wilkie 46363f4129 Make reverse dns lookups honor tombstones. 2015-08-25 12:01:09 +00:00
Tom Wilkie db2e7e4ba1 Merge pull request #1355 from weaveworks/1343-docker-bridge-in-resolv-conf
Pass docker bridge ip to dns server, and filter it out of upstream dns ips.
2015-08-25 09:48:06 +01:00
Tom Wilkie 58ae0cd113 Pass docker bridge ip to dns server, and filter it out of upstream dns ips. 2015-08-24 16:00:26 +00:00
Tom Wilkie 4809c113b3 Update comment. 2015-08-24 15:43:31 +00:00
Tom Wilkie 8516ab7c69 Unify logic to tell if DNS response is too big. 2015-08-21 12:39:12 +00:00
Matthias Radestock 2284bc2120 move error response construction to handler
and implement it in terms of existing functions, plus provide a
convenience method for sending the rather common NameError.
2015-08-21 12:09:22 +01:00
Matthias Radestock 0b5f5fd74e extract response writing 2015-08-20 20:24:12 +01:00
Matthias Radestock 9a7abe68fd optimise response construction when no truncation is required
no need to do a binary search if all the answers fit
2015-08-20 20:18:56 +01:00
Matthias Radestock 2ea27ec08f simplify response truncation 2015-08-20 19:55:19 +01:00
Matthias Radestock 322441d5c8 inline truncateResponse 2015-08-20 19:55:19 +01:00
Matthias Radestock 7c7c302920 extract response construction 2015-08-20 19:17:03 +01:00
Matthias Radestock 69986e77dd cosmetic 2015-08-20 18:46:55 +01:00
Matthias Radestock 8182022d52 refactor dns handlers
introduce a handler struct, which

- enables lifting of all the handle* closures to methods
- eliminates the passing around of defaultMaxResponseSize
- reduces the number of free-floating functions
2015-08-20 18:27:58 +01:00
Tom Wilkie 67f974923b Test for recursive DNS queries & compression.
Note this doesn't test the golang resolver, where the original error
was found, as I can't find a way to point the golang resolver at a
custom dns server during a test.  It does check that a compressed
response from an upstream server is correctly handled.
2015-08-17 18:25:36 +01:00
Tom Wilkie 4f00dab4c4 Compress recursive answers if they are too big. 2015-08-17 18:25:26 +01:00
Tom Wilkie 6a5044fc70 Make nameserver logging more consistent. 2015-08-11 11:32:19 +00:00
Tom Wilkie 7fa568872c Ensure we delete the fqdn is the container fails to start. 2015-08-11 11:32:17 +00:00
Adam Harrison fc9a1c8664 new weave status, weave status ..., and weave report 2015-08-11 12:15:13 +01:00
Matthias Radestock 755a949f6d Merge pull request #1277 from weaveworks/1275-negative-dns
Return NXDOMAIN when we don't have entries

and drop the non-authoritative special case for recursive dns.

Fixes #1275.
2015-08-10 17:19:44 +01:00
Tom Wilkie c2d5b35cd6 Add test for negative DNS queries 2015-08-10 13:13:12 +00:00
Tom Wilkie 073836905a Return NXDOMAIN when we don't have entries, and drop the non-authoritative special case for recursive dns. 2015-08-10 12:19:21 +00:00
Matthias Radestock fd2a59417d cosmetic 2015-08-10 12:39:00 +01:00
Tom Wilkie db6ee9954c Allow users to set dns listen address so we can run the weave router in the host net namespace. 2015-07-28 14:49:09 +00:00
Tom Wilkie 2980586e76 Put timeout on nameserver test to try and expose #1203 2015-07-21 09:25:04 +00:00
Tom Wilkie 9131b46263 Flush gossip messages after each turn, to ensure there isn't a build up of pending messages. 2015-07-20 14:36:40 +00:00