Commit Graph

152 Commits

Author SHA1 Message Date
3c6b6553fb Use peerAddress as the thing to listen on 2019-10-03 18:35:54 +01:00
2244eb8597 Advertise your peer address as advertised address 2019-10-03 17:37:29 +01:00
2370fb1209 Set gateway to node address rather than id 2019-10-02 15:52:31 +01:00
308424488b Hash the network address 2019-10-02 15:22:44 +01:00
77f3e7ef48 Simplified table code. Fixed event dedup. 2019-09-26 11:56:30 +01:00
ae40553bad only solicit the first time seeing a peer 2019-09-25 14:30:35 +01:00
f23c6d91ba Do not embed proxy/router/tunnel 2019-09-25 12:56:52 +01:00
f13887f604 Only hash address if its a local route 2019-09-20 09:40:55 +01:00
7e05d2c440 Replace Nodes with Peers 2019-09-19 16:32:15 +01:00
6222bc2a1e only set tunnel address if advertise is blank 2019-09-18 19:04:22 +01:00
05e62a2b95 allow setting advertise address 2019-09-18 18:56:02 +01:00
38d6ffdf9a Hash the service address before advertising it to the network. 2019-09-17 18:34:06 +01:00
e586763301 Merge pull request from milosgajdos83/delete-peer-gw
Delete dead peer [gateway] routes
2019-09-17 16:54:35 +01:00
3201b4cb36 Gateway is now set to node Id, hence we prune peer.id Gateway 2019-09-17 16:31:33 +01:00
21dc7bcccf Fix gateway addressing
- Set Gateway as node.ID when advertising
- Set server.Address as node.ID to listen on
- Set server.Advertise as node.Address
2019-09-17 16:11:02 +01:00
9147d378bc Set node address to tunnel address 2019-09-17 15:40:00 +01:00
a72a2f717d Prune stale nodes in the whole topology. 2019-09-16 19:22:55 +01:00
2599ee8591 Prune routes routable via dead node. 2019-09-15 12:17:12 +01:00
ccb6778f7f Skip processing Advert which carries no events 2019-09-13 20:46:14 +01:00
b23ee58865 Update default.go 2019-09-13 11:55:53 -07:00
323a72be34 Small refactoring; Split horizon loop break. 2019-09-13 18:46:24 +01:00
d72e91fb38 Unlock on return from network.Connect 2019-09-13 03:31:58 +01:00
b91c3147e7 Node API allows us to drop all network locks
Network locks are now needed only when accessing client map. node map
access is serialied with the node mutex.
2019-09-13 03:03:56 +01:00
77c6c9781b getProtoTopology has been replaced by PeersToProto
This helps us remove redundant code across node and handler
2019-09-13 03:03:56 +01:00
fa4ff8921e Removed redundant lock. Simplified proto topology 2019-09-13 03:03:56 +01:00
d6be91e8af Changed RPC methods. Changed Network interface.
* Nodes/Topology removed from public methods from Network interface
* Peers() returns max depth 3 topology
* handler.Topology rpc endpoint removed
* handler.Peers rpc endpoint accept "depth" param to return max depth peers
2019-09-13 03:03:56 +01:00
588484c3bf Fixed some races. Added more tests. 2019-09-13 03:03:56 +01:00
d58eb51976 Code change to make Solicit router.proto message 2019-09-13 03:03:55 +01:00
2dfbe93d65 Added more node tests. Small refactoring of Netowkr and handler. 2019-09-13 03:03:55 +01:00
4c709f7ac1 Write Lock() advert update: we are writing into peers map here 2019-09-13 03:03:55 +01:00
baf4c05663 Send solicit message to ControlChannel 2019-09-13 03:03:55 +01:00
195c6a8c90 Neighbour is now peer. Neighbourhood is Peers. Small refactor. 2019-09-13 03:03:54 +01:00
f91d0408ab Moved node implementation into dedicated source file 2019-09-13 03:03:54 +01:00
eec780aaa7 Update neighbours when neighbour message is received 2019-09-13 03:03:54 +01:00
f0a1031e97 Adding new peers up to given depth. Outline of node gaph Update 2019-09-13 03:03:54 +01:00
e8aaca27d3 unlock before sending the message to avoid deadlock 2019-09-06 16:57:17 +01:00
7971b1b7f9 Remove debug logs 2019-09-06 15:12:23 +01:00
dafbacbdcb Properly handle the list of the nodes. Send solicit on ControlChannel 2019-09-06 15:09:49 +01:00
dddfb6f878 Fixed typos and simplified map iteration 2019-09-05 17:59:14 +01:00
ec354934e3 Move Errors to separate init block 2019-09-05 17:44:47 +01:00
b01c8e06e0 Update error name to ErrClientNotFound 2019-09-05 17:43:59 +01:00
5ddfd911ba Replace send message code by one network method 2019-09-05 17:18:16 +01:00
2522d8cb96 Send solicit message when new neighbour is discovered 2019-09-05 16:04:44 +01:00
4b1a7abb42 Freeze network graph when building full network topology
Also added some comments and debug logs
2019-09-05 00:16:22 +01:00
46a9767648 Merge pull request from milosgajdos83/advert-lastseen
Update node.lastSeen properly. Set node.lastSeen when processing advert
2019-09-04 18:13:43 +01:00
dd9f42e3b9 Update lastSeen timestamp properly. Set lastSeen when processing advert 2019-09-04 18:02:13 +01:00
f2c8492c77 Merge pull request from micro/tunnel
Tunnel session management and unicast/multicast
2019-09-04 16:25:38 +01:00
b9c437fbfe Tunnel discover/announce/open/session/close 2019-09-04 09:48:05 +01:00
4f4b3d3bae Send connect message to NetworkChannel once we are not at caller mercy 2019-09-03 19:51:52 +01:00
6eb6d050ed Major bug overhaul in how we handle network.Nodes and related handler 2019-09-03 16:39:27 +01:00