Commit Graph
456 Commits
Author SHA1 Message Date
Matthias Radestock f5918a3c14 remove dead code
since #1248
2015-08-27 08:42:48 +01:00
Adam Harrison 1e83e7a95c Merge branch '1.0' 2015-08-20 15:33:59 +01:00
Adam Harrison 086ab9d126 Correct MaxUDPPacketSize constant 2015-08-20 15:22:10 +01:00
Matthias Radestock 99ab0d3abc Merge branch '1.0' 2015-08-19 11:29:23 +01:00
Matthias Radestock 0b764a2a27 plug GossipSender leak
GossipChannel.sendDown is the (only) place which creates
GossipSenders. It has two call sites, Send and SendDown, only the
former of which performed a gc of existing senders. Therefore, in
configurations with

- a lot of connection churn, and
- SendDown invocations for these connections, and
- few or no Send invocations

we can leak GossipSenders.

The most likely scenario for this to occur is a peer that, while
having no other connections, is making/accepting connections which get
torn down post handshake, e.g. because IPAM detected a clash.

Fixes #1329.
2015-08-19 10:22:11 +01:00
Matthias Radestock d8e8cd6e51 don't reconnect to ourself
When we discover that a connection target address leads to ourself we
set the retry time to the zero time.Time value - the only special
time.Time value. We use that marker to a) suppress subsequent
connection attempts, and b) display the next retry as 'never' in
`weave status|report`.

Closes #1305.
2015-08-18 00:51:33 +01:00
Matthias Radestock c1d799a06c add pcap stats to weave report
Closes #1185.
2015-08-11 12:57:52 +01:00
Adam Harrison fc9a1c8664 new weave status, weave status ..., and weave report 2015-08-11 12:15:13 +01:00
Adam Harrison 278807a199 Move router HTTP handlers into router/http.go 2015-08-11 12:01:27 +01:00
David Wragg e7ee72836d Log -> log 2015-08-03 14:13:24 +01:00
David Wragg 31c0506b85 Eliminate dotted imports of common for the sake of Log 2015-08-03 14:07:16 +01:00
David Wragg 7d6f85424c Move OnOff into router.go 2015-08-03 14:06:23 +01:00
Paul Bellamy 5e9bd5424a Removed all the imports from "code.google.com" 2015-07-29 15:47:02 +01:00
Matthias Radestock 0b7d462adf enforce a message size limit
so we do not allocate loads of memory when receiving (accidental or
deliberate) garbage
2015-07-20 23:51:04 +01:00
Matthias Radestock 6f8622a1a0 replace outermost framing on tcp connection
switch from gob to length-prefix encoding
2015-07-20 23:51:04 +01:00
Matthias Radestock af049efb40 refactor: s/SimpleTCP{Sender,Receiver}/GobTCP{Sender,Receiver} 2015-07-20 23:51:02 +01:00
Matthias Radestock ad4e4ce6b8 refactor: make 'inner' encoder/decoder explicit 2015-07-20 23:50:10 +01:00
Matthias Radestock ca523c716c cosmetic 2015-07-17 10:58:01 +01:00
Bryan Boreham acf13dc157 Add sender to OnGossipBroadcast() 2015-07-15 12:07:56 +01:00
Matthias Radestock bbacaa42b8 cosmetic 2015-07-14 13:23:28 +01:00
Matthias Radestock 2f35ad1d42 Merge pull request #1098 from dpw/encrypt-features
New connection protocol version with encrypted features map

Closes #1029. Closes #912.
2015-07-14 13:20:18 +01:00
Matthias Radestock 85b4a05c9a Merge branch '1.0' 2015-07-13 19:07:47 +01:00
Adam Harrison f3c4a9fc6d Limit router accept rate with token bucket 2015-07-13 15:02:31 +01:00
Adam Harrison 9634526a67 Add token bucket implementation 2015-07-13 15:01:04 +01:00
Adam Harrison b67c102fe5 Remove simple sleep from router accept 2015-07-13 15:01:04 +01:00
Matthias Radestock 7aab5cc5b4 refactor: simplify NewPeers 2015-07-11 17:46:57 +01:00
Matthias Radestock 2b61bc91df cosmetic: remove blank log lines 2015-07-11 16:43:33 +01:00
Matthias Radestock aaba681db1 remove dead code 2015-07-11 01:54:37 +01:00
Matthias Radestock a05c65c73b simplify feature extraction 2015-07-09 14:38:08 +01:00
David Wragg 14d346db8b Add a --protocol-min-version option to router
To allow users to forgo compatibility with Weave Net 1.0 in order to
avoid #912, by setting --protocol-min-version=2.
Defaults to --protocol-min-version=1, i.e. compatible but vulnerable.
2015-07-09 14:38:06 +01:00
David Wragg 882f14d50c Version 2 protocol, which encrypts the features map
With V1 compatibility
2015-07-09 14:37:42 +01:00
Bryan Boreham b93070f91a Fix log message on peer move 2015-07-09 12:51:52 +01:00
Bryan Boreham cbcd5da680 Fix log message on peer move 2015-07-09 12:33:39 +01:00
David Wragg 501f40d9c1 Consolidate remote peer checks 2015-07-08 17:21:32 +01:00
Tom Wilkie c8718d85dc Extend router/peers.go to allow multiple OnGC callbacks, and call the callbacks outside of the peers lock. 2015-07-08 14:47:02 +00:00
David Wragg e50b1f1fe7 Remove the "found" return value from Peers Fetch method
Callers can simply check whether the returned *Peer is nil.
2015-07-08 09:06:33 +01:00
David Wragg 5e10b901a3 Drop the check for duplicate connections in the handshake
Duplicate connections are also detected and handled in AddConnection,
I have not been able to reproduce #182 without the check, so although
it may once have been necessary, it doesn't seem to be needed now.
2015-07-08 09:03:51 +01:00
David Wragg a6a74001bd Make TCPReceiver more closely mirror TCPSender 2015-07-08 08:53:53 +01:00
Matthias Radestock bf73029d15 cosmetic: goimports -w . 2015-07-03 20:41:35 +01:00
Matthias Radestock 4dbd657a26 import gopacket from github instaead of google code
The latter redirects to the former, which breaks `go get`.

Closes #1071.
2015-07-03 20:32:27 +01:00
Paul Bellamy 5b79e274e8 fixup logging changes, so it compiles 2015-07-02 17:04:21 +01:00
Alvaro Saurin f6ffd604dd Removed all the imports from "code.google.com" 2015-07-02 13:32:52 +02:00
Bryan Boreham 013380c7e7 Update router code to use common logger 2015-07-01 12:26:23 +01:00
Matthias Radestock ab943d938a refactor: don't return encoder from handshake()
We did this for symmetry/completeness, but the encoder is actually
"consumed" by handshake() in the creation of the tcp senders, hence it
is in fact dangerous to return it.
2015-06-29 12:38:21 +01:00
David Wragg d6fedc1e6e Remove error return value from DecodeLayers
It is never checked, so add a comment explaining why.
2015-06-29 10:47:56 +01:00
David Wragg 3222478449 Remove the LogFrame when fragmenting
Subsequent commits make this LogFrame call a little tricky to retain,
and it's not clear that it is really needed.
2015-06-29 10:47:26 +01:00
Matthias Radestock 039a2030db refactor: make DF flag passing logic more obvious
...and provide a better abstraction for sending special frames.
2015-06-26 11:11:17 +01:00
Matthias Radestock 33d85aaee5 Merge pull request #1016 from dpw/defer-df
Don't inspect the DF flag earlier than we need to
2015-06-26 11:10:42 +01:00
Matthias Radestock ee2a66323e Merge branch '1.0'
Conflicts:
	ipam/ring/ring_test.go
2015-06-25 19:57:09 +01:00
David Wragg 64ac7745fe Don't inspect the DF flag earlier than we need to 2015-06-25 17:11:52 +01:00