Matthias Radestock
dc96fc17a9
correct protocol version
...
let us not get ahead of ourselves
2015-05-16 01:09:53 +01:00
Bryan Boreham
3cd1a17c23
IP Allocation Management
...
Using the Ring CRDT and Weave gossip, provides an interface
for the weave script to allocate IP addresses in `weave run`,
`weave start` and `weave expose`.
See docs/ipam.md for implementation details, and site/features.md
for user-visible changes.
2015-05-14 17:44:06 +01:00
Matthias Radestock
c158b86dc6
refactor: shorten a method name
2015-05-14 15:13:10 +01:00
Matthias Radestock
c7dd48d769
introduce PeerUID type
2015-05-14 12:35:01 +01:00
Matthias Radestock
ace56da7b3
allow Gossiper.Gossip to return nil
...
...to indicate 'no data'
2015-05-14 12:02:56 +01:00
Matthias Radestock
953449c215
refactor: extract Peer.ForEachConnectedPeer helper
2015-05-11 21:06:07 +01:00
Matthias Radestock
c5c93d3a77
refactor: increase similarity betweeen parts of route calculation
2015-05-11 20:14:24 +01:00
Matthias Radestock
039446f756
cosmetic: remove outdated comment
2015-05-11 20:00:04 +01:00
Matthias Radestock
43133b5851
increase tolerance for missed udp heartbeats
...
3 are quite easy to miss when there is contention. 6 less so.
2015-05-11 18:35:06 +01:00
Matthias Radestock
e246e6acc6
coarser lock granularity
...
- get rid of individual Peer locks
- hold Peers read (or write) lock and LocalPeer read lock while
performing route calculations
This eliminates the deadlock resulting from the inconsistent lock
acquisition order in route calculcation.
Fixes #643 .
2015-05-11 17:19:54 +01:00
Matthias Radestock
5bd8730353
make Peer.Encode lock-free
2015-05-11 17:19:51 +01:00
Matthias Radestock
c210f0e3c1
make Peer.Info lock-free
2015-05-11 17:19:46 +01:00
Matthias Radestock
426d8edb31
remove Peer.SetVersionAndConnections
...
further shrinking Peer API
2015-05-11 17:19:43 +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
5bf6889250
remove Peer.Version
...
further shrinking the Peer API
2015-05-11 17:19:35 +01:00
Matthias Radestock
0229185ffe
move ConnectionTo from Peer to LocalPeer
...
further shrinking the former's API
2015-05-11 17:19:31 +01:00
Matthias Radestock
505ced5cc8
move localRefCount accounting responsibility from Peer to Peers
...
This makes for a more symmetric API - Peers.FetchWithDefault does the
increment and Peers.Dereference does the decrement, whereas previously
the latter was done by Peer.DecrementLocalRefCount.
This does increase lock granularity, i.e. modifying any ref count now
requires a write lock on Peers.
2015-05-11 17:19:23 +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
4bef9d90fb
cosmetic: resolve some linter complaints
2015-05-11 02:33:56 +01:00
Matthias Radestock
ef2c55141b
keep linter happy
2015-05-11 02:25:01 +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
Matthias Radestock
8caa58af26
Merge branch 'weave-common-signals' of https://github.com/inercia/weave into inercia-weave-common-signals
2015-05-06 19:33:06 +01:00
Alvaro Saurin
f723d5afd8
Move the router to the new signals handler
2015-05-06 15:07:36 +02:00
Matthias Radestock
e656d74633
cosmetic
2015-05-05 22:08:03 +01:00
Matthias Radestock
22e612a738
Merge branch 'reduced_gob' of https://github.com/awh/weave into awh-reduced_gob
2015-05-05 21:36:09 +01:00
Adam Harrison
ab68a1c325
Introduce PeerSummary
2015-05-05 10:59:09 +01:00
Matthias Radestock
e40f1fe9a7
fix typo and reformat
2015-05-02 17:46:21 +01:00
David Wragg
be983931fc
Produce a better error message when there is no real SetImmediateMode
...
If gopacket is compiled against an older pcap.h that doesn't have
pcap_set_immediate_mode, it supplies a dummy definition that
always returns PCAP_ERROR. That becomes "Generic error", which
is not very helpful. The real pcap_set_set_immediate never
returns PCAP_ERROR, so this turns it into a more informative
message.
2015-05-01 21:40:53 +01:00
Matthias Radestock
137776bcb2
remove decryptor shutdown
...
we only needed it because of the nonce channels
2015-04-30 14:47:16 +01:00
Matthias Radestock
e223899982
remove nonce transmission from protocol
2015-04-30 14:47:16 +01:00
Matthias Radestock
b365c3806b
replace random nonces with message sequence numbers in udp crypto
2015-04-30 14:47:16 +01:00
Matthias Radestock
696bfe464c
replace random nonces with message sequence numbers in tcp crypto
...
Since TCP is reliable, we do not need to transmit the nonce itself;
the recipient can simply construct the nonce from its own message
counter. Hence there is no message envelope and we can thus remove a
whole layer of encoding.
2015-04-30 14:47:16 +01:00
Adam Harrison
b48a93c483
Remove obsolete connsIterator
2015-04-30 13:06:57 +01:00
Adam Harrison
047614b540
Encode/decode []ConnectionSummary instead of []byte
2015-04-30 13:03:18 +01:00
Adam Harrison
26dfc42034
Bump protocol version due to gob restructuring
2015-04-29 16:39:14 +01:00
Matthias Radestock
61a5640a95
do not connect to weave port of outbound connection endpoints
...
There is no point.
2015-04-28 16:07:34 +01:00
Matthias Radestock
e45ea65e45
tiny simplifying refactor
2015-04-27 15:51:25 +01:00
Matthias Radestock
b74348e59d
d'oh
2015-04-27 08:58:02 +01:00
Matthias Radestock
ce03f27044
refactor: use 'copy' instead of for loop for slice->array copy
2015-04-27 07:42:52 +01:00
Matthias Radestock
1de86f4312
cosmetic
2015-04-27 07:30:17 +01:00
Matthias Radestock
02a7875eb8
refactor: remove last dependency of crypto on LocalConnection
2015-04-27 07:27:31 +01:00
Matthias Radestock
ea4e84cdd3
refactor: (almost) remove dependency of crypto on LocalConnection
2015-04-27 07:14:30 +01:00
Matthias Radestock
29c02d2724
refactor: lift error handling out of Encryptor.Bytes()
...
in order to reduce dependency on LocalConnection
2015-04-27 07:12:21 +01:00
Matthias Radestock
fcd44c37e1
refactor: reduce coupling between connections and crypto
2015-04-27 06:13:41 +01:00
Matthias Radestock
ff49bb5125
document why we carry the DF flag in payload
2015-04-25 12:36:05 +01:00
Matthias Radestock
d82f60f18b
cosmetic
2015-04-25 12:06:20 +01:00
Matthias Radestock
d15575212a
refactor: no need to record 'df' in two places in state
2015-04-25 12:05:17 +01:00
David Wragg
dceef04ffa
Separate Forwarder and ForwarderDF
...
Much of the state and code associated with Forwarder only applied in the
DF case.
2015-04-18 10:38:05 +01:00
Matthias Radestock
a5a91ebb33
do not shut down connections on PacketDecodingError
2015-04-15 21:52:56 +01:00