Matthias Radestock
2b61bc91df
cosmetic: remove blank log lines
2015-07-11 16:43:33 +01: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
Bryan Boreham
013380c7e7
Update router code to use common logger
2015-07-01 12:26:23 +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
David Wragg
576dd69b0b
Add a comment to Router's Start method
2015-06-24 17:37:02 +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
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
8f85a07ecc
introduce '-nodiscovery' option to disable automatic peer discovery
...
Closes #847 .
2015-06-05 15:13:48 +01:00
Matthias Radestock
c10f1dacad
introduce OnOff helper, for consistency in status output
2015-06-05 15:00:02 +01:00
Matthias Radestock
16410d6014
refactor: make encryption status part of router status
2015-06-05 10:05:17 +01:00
Matthias Radestock
044992eea0
limit acceptance rate on peer connections
...
The main purpose of this is to set an upper bound on the rate at which
an attacker might execute a brute force attack on the weave password.
No need to get clever or precise here.
Closes #837 .
2015-06-04 14:21:35 +01:00
Paul Bellamy
d16395b8b9
weave status should include 'Direct Peers' set with 'weave connect'
2015-05-28 11:49:46 +01:00
Matthias Radestock
68ef0e845a
cosmetic: yet more linter happiness
2015-05-27 16:56:38 +01:00
David Wragg
530a39350b
Make gossip use channel names on the wire, not channel name hashes
2015-05-27 12:51:14 +01:00
Matthias Radestock
86ba3be4f7
move Connections from Peer to LocalPeer
...
further shrinking the former's API
2015-05-11 17:19:38 +01:00
Matthias Radestock
3e6eef5ebd
refactor(ish): move a bunch of methods from Peer to LocalPeer
...
in order to reduce the former's API surface
2015-05-11 17:19:15 +01:00
Matthias Radestock
0cbbe9bac3
make Peer.String() return the common case
...
When we want a string representation of a Peer, we nearly always just
want the full name. So make String() return that and introduce Info()
to return expanded info.
2015-05-10 23:58:23 +01:00
Matthias Radestock
7b0f432339
cosmetic: fix typo
2015-05-09 17:11:52 +01:00
Alvaro Saurin
f723d5afd8
Move the router to the new signals handler
2015-05-06 15:07:36 +02:00
Matthias Radestock
fcd44c37e1
refactor: reduce coupling between connections and crypto
2015-04-27 06:13:41 +01:00
Matthias Radestock
a5a91ebb33
do not shut down connections on PacketDecodingError
2015-04-15 21:52:56 +01:00
Matthias Radestock
f4ba0f7287
log udp packet processing errors against the connection
2015-04-15 21:10:22 +01:00
Matthias Radestock
339f85cbcb
get rid of Router.NormalisePeerAddr
...
There was only one call site left and it always gets invoked with an
ip:port, so normalisation is a no-op.
Also remove mysterious comment.
2015-04-15 11:44:48 +01:00
Matthias Radestock
290d5443cc
more discriminate connectivity
...
If a peer was specified on the command line w/o a port, then do not
connect to it if we have inbound connections from that IP.
This eliminates unnecessary (and ultimately failing) connection
attempts in the common scenario of several peers having been told
about each other on their command lines.
We represent a command line peer address with a TCPAddr, which avoids
back and forth conversion to string and extra fields to carry the "did
the original include a port?" information.
2015-04-15 11:42:53 +01:00
Matthias Radestock
798bfeb0a7
make the Router include the RouterConfig
...
rather than copying the bulk of it
2015-04-14 11:39:11 +01:00
Matthias Radestock
21102d3615
refactor: extract router configuration
...
the param list of NewRouter was getting a bit long
2015-04-12 10:46:46 +01:00
Matthias Radestock
e89e3adc69
cosmetic: more consistent param/arg/var ordering re Port
2015-04-12 10:45:49 +01:00
David Wragg
7d51f8751b
gofmt
2015-04-10 20:55:27 +01:00
Alex Bligh
12d88eac23
Add options to set ports on weaver command line
...
This commit adds two command line options, intended to allow multiple
instances of weave to run without container separation between them.
* -port=PORT makes weave bind to port PORT (an integer). Without the
option, the default value (6783) is used.
* -httpaddr=ADDRESS makes weave bind its control interface to
a different address. For instance "127.0.0.1:6784" can be used to
bind to localhost only. An absent address element makes it bind to
all interfaces. ":6784" is the default. An empty string
can be used to disable the control interface.
Signed-off-by: Alex Bligh <alex@alex.org.uk >
2015-04-10 12:09:13 +01:00
Matthias Radestock
f80410bf59
switch to gossip broadcast for topology updates
2015-04-06 14:17:23 +01:00
Matthias Radestock
8a2828d57d
add "representation of received update" to return of Peers.ApplyUpdate
2015-04-06 14:17:23 +01:00
Matthias Radestock
a58eb6ba7d
make gossip broadcast operate on GossipData
2015-04-06 14:00:51 +01:00
Matthias Radestock
e8e9a43abd
tired of typing "struct{}{}"
2015-04-06 11:53:51 +01:00
Matthias Radestock
6db12d682e
make PeerNameSet a more broadly used type
2015-04-06 11:45:17 +01:00
Matthias Radestock
74b3f8d44e
use map[...]struct{} for sets instead of map[...]bool
...
See https://groups.google.com/d/msg/golang-nuts/lb4xLHq7wug/MhrSLkyS4F8J
We don't really care about the performance aspect of this, but using
struct{}{} values is in some way canonical since it means the
representation carries no redundant information.
2015-04-06 11:35:11 +01:00
Matthias Radestock
624373ace2
simplify
2015-04-05 17:03:18 +01:00
Matthias Radestock
8c1015d2a4
cosmetic: consistent terminology in var names
2015-04-04 22:18:31 +01:00
Matthias Radestock
bcd2a0184c
small refactor
2015-04-04 20:08:38 +01:00
David Wragg
587a67d701
Comment
...
It's not blindingly obvious where this 'found' comes from.
2015-04-02 16:37:30 +01:00
Matthias Radestock
e97a3f88aa
allow router to be started w/o capture/inject interface
...
useful for testing of the control plane
2015-04-02 09:46:29 +01:00
Matthias Radestock
e33d2eaf8e
cosmetic
2015-04-02 07:10:21 +01:00
Matthias Radestock
07c11d87a8
oops
...
I broke this in 1eca5e1097
2015-03-29 12:11:59 +01:00
David Wragg
78c70023d8
Don't pass the sender UDPAddr through the crypto layer
...
The crypto layer doesn't need it, and the cost of an additional
closure allocation for each incoming UDP packet is modest.
Also, make the FrameConsumer the last parameter to IterateFrames.
It seems a more natural ordering.
2015-03-27 18:05:00 +00:00