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
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
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
David Wragg
5690902173
Move DF indication into LogFrame
2015-06-25 17:11:20 +01:00
David Wragg
4162dcafd3
Make the full EthernetDecoder available to LogFrame
...
So that LogFrame can include information about the decoded frame beyond
the ethernet layer.
2015-06-25 17:11:20 +01:00
Bryan Boreham
b472da18f0
Improve logging of unicast gossip errors
2015-06-25 14:04:37 +01:00
Bryan Boreham
9f784b3c31
Report errors in unicasting gossip
2015-06-25 12:22:53 +01:00
David Wragg
7387caa2eb
Eliminate forwarder Start methods
2015-06-24 17:37:07 +01:00
David Wragg
576dd69b0b
Add a comment to Router's Start method
2015-06-24 17:37:02 +01:00
David Wragg
5e6b107d01
Eliminate the GossipSender Start method
2015-06-24 17:35:26 +01:00
David Wragg
f444ae9224
Eliminate ConnectionMaker Start method
2015-06-24 17:35:26 +01:00
David Wragg
8f5d1eec11
Eliminate the Routes Start method
2015-06-24 17:35:17 +01:00
David Wragg
72039bbe5a
Eliminate the LocalPeer Start method
2015-06-23 16:08:43 +01:00
David Wragg
d6bceb139e
Eliminate MacCache Start method
2015-06-23 16:08:43 +01:00
David Wragg
a311623bb9
Eliminate the Start method on LocalConnection
2015-06-23 16:08:43 +01:00
Paul Bellamy
cdee7a5d6f
Replacing custom testing helpers with testify, where possible
2015-06-17 16:58:03 +01:00
Paul Bellamy
06101d134b
Running goimports
2015-06-17 15:32:08 +01:00
Matthias Radestock
25dd60a149
Merge pull request #928 from awh/offset_tcp_nonce
...
Set high bit in TCP nonce to differentiate from UDP
Fixes #927 .
2015-06-16 13:21:09 +01:00
Adam Harrison
9149366919
Set high bit in TCP nonce to differentiate from UDP
2015-06-16 12:21:18 +01:00
Matthias Radestock
3124ffede5
more forward/backward compatible protocol versioning
...
We now first exchange a very minimal header, consisting of just the
name of the protocol ("weave") and the min and max version (encoded as
a byte each) we support. This leaves all other details of the
protocol, including the contents of of the handshake, open.
Peers agree to communicate using the maximum mutually supported
version. We record this in the LocalConnection, though atm nothing is
making use of that information.
We set a shorter than normal deadline (10s instead of 60s) for the
header exchange, so we detect version mismatches, garbage, or
non-responsive remotes quickly.
We reset the protocol version to '1' since this is a fresh start; old
weaves will not be able to parse the header.
Closes #871 .
2015-06-16 11:00:41 +01:00
Matthias Radestock
e15ebd9118
add unit test for SurrogateGossiper
2015-06-15 14:22:25 +01:00
Matthias Radestock
dea5bd0639
introduce SurrogateGossiper for dealing with unknown gossip channels
...
Instead of erroring when we receive gossip for an unknown channel, we
create a GossipChannel on the fly, with a SurrogateGossiper singleton
as the gossiper.
The SurrogateGossiper ignores unicasts and relays broadcasts and
gossip.
2015-06-15 11:23:32 +01:00
Matthias Radestock
0b3584a355
permit encoding of GossipData into multiple messages
2015-06-15 11:14:24 +01:00
Matthias Radestock
94220f22b2
allow dynamic addition of gossip channels
2015-06-15 11:14:24 +01:00
Matthias Radestock
bfebfecf6c
refactor: simplify test router creation
2015-06-15 08:12:35 +01:00
Matthias Radestock
e48ec6a35f
clean up erroneous comment
2015-06-15 08:03:02 +01:00
Matthias Radestock
c4c5ec1e92
refactor: add a little helper to improve abstraction
2015-06-14 11:09:55 +01:00
Matthias Radestock
cea85eb05b
cosmetic: move GossipChannel code into separate file
2015-06-14 10:35:51 +01:00
Matthias Radestock
3e0d0a1993
refactor: introduce NewGossipChannel
2015-06-14 10:09:36 +01:00
Bryan Boreham
658fbac7aa
Keep flushing gossip until it's all gone
...
A better (i.e. working?) fix for #885 .
2015-06-12 14:50:37 +01:00
David Wragg
5ce4b25f38
Merge rade/746_simplify_frag_test (PR #888 ): simplify fragmentation test
...
Closes #746 .
2015-06-10 18:28:26 +01:00
Bryan Boreham
e21f66db0a
Use address.Range instead of (start,end) pairs
2015-06-10 17:24:36 +01:00
Bryan Boreham
2553850ed4
Initial implementation of multi-subnet IPAM
2015-06-10 17:21:16 +01:00
Matthias Radestock
0ab7c31bbe
Merge pull request #886 from bboreham/885-gossip-race
...
Avoid gossip test race conditions
Fixes #885 .
2015-06-10 13:50:40 +01:00
Bryan Boreham
0cd4127087
Factor out GossipSender.flush()
2015-06-10 12:24:19 +01:00