Commit Graph
25 Commits
Author SHA1 Message Date
Matthias Radestock 8b37e07823 get rid of connection attempt count tracking 2014-09-15 15:05:40 +01:00
Matthias Radestock 4e442393b2 refactor: 'enum' -> bool 2014-09-10 16:39:05 +01:00
Bryan Boreham 2050569fb6 Break checkStateAndAttemptConnections into phases, and track the end of all connection attempts 2014-09-10 14:50:43 +01:00
Bryan Boreham 4335615688 Track command-line targets in a separate set, to simplify tracking of targets 2014-09-10 14:12:37 +01:00
Bryan Boreham 634d4e0fe3 cosmetic 2014-09-10 13:45:56 +01:00
Bryan Boreham 26f8a68a82 Remove stuff that is not needed with new ConnectionMaker approach 2014-09-10 12:29:21 +01:00
Bryan Boreham 84aeaf340a New implementation of ConnectionMaker just periodically scanning who we need to connect to 2014-09-10 12:08:49 +01:00
Bryan Boreham 64999d830d State of connection is now three-way choice rather than two booleans 2014-09-08 17:30:54 +01:00
Bryan Boreham 16e9daf057 Reformatted with 'go fmt' 2014-09-08 16:25:55 +01:00
Bryan Boreham 5cf2cb0c50 Keep track of which connections have been established 2014-09-08 15:36:19 +01:00
Bryan Boreham dec794eb72 Remove all references to PeerName in ConnectionMaker 2014-09-08 15:05:50 +01:00
Bryan Boreham 0a94388f0a Change ConnectionMaker from being focused on PeerName to being focused on address 2014-09-08 12:42:06 +01:00
Bryan Boreham 2d387e3847 Removed ConnectionMaker.activeConnections which is never used 2014-09-05 14:28:47 +01:00
Bryan Boreham 54d7972b5e Don't start a new connection attempt until all in-flight attempts for this peer have finished
Also cleaned up the naming slightly
2014-09-05 14:26:42 +01:00
Bryan Boreham 09271f4848 Track which connections we are currently attempting a connect on, so we don’t do multiple attempts at the same time to the same endpoint 2014-09-05 11:16:13 +01:00
Matthias Radestock 2649796369 discover pmtu with binary search
issue #15
2014-08-31 13:39:44 +01:00
Matthias Radestock 7dd0bcd1e0 deal with pmtu verification confirmation in forwarder goroutine
...rather than connection goroutine.
This is a precurser to smarter pmtu verification, the logic for which
is in the forwarder.
issue #15
2014-08-30 23:18:44 +01:00
Matthias Radestock 5b6dc2d762 (slightly) faster pmtu discovery
Issues with the previous scheme...

When we have just encountered an EMSGSIZE, the odds of encountering
another one straight away, when attemtping to send a verification
packet with the lower mtu, are slim, since for a new, lower mtu to be
set some packet must have made it further then the one that triggered
the icmp3.4 that gave rise to the EMSGSIZE, and we must have received
the resulting icmp3.4. All of which takes time.

Also, sending a bunch of udp packets in rapid succession is not a
great way to improve their chances of making it through to the other
peer, since they could easily all get dropped by a single congestion
event or other network glitch.

Now we send a single verification packet, wait for a short while, and
if we don't get a response then we send another one, wait for longer
period (2x), etc, until some upper bound is reached, at which point we
lower the pmtu and start the verification process again (same as
currently happens).

We are now also calling flush() to send the verification packet, just
as we do for ordinary packets. This makes for shorter code, consistent
error handling, and introduces a nice little recursion :)
2014-08-29 19:15:18 +01:00
Matthias Radestock eb5d6f0d89 refactor: extract Forwarder 2014-08-27 23:31:37 +01:00
Matthias Radestock 6cec7a036c refactor: yet more clarity on naming around pmtu 2014-08-27 17:55:43 +01:00
Matthias Radestock f5e3450f0c refactor: clear distinction between actual and effective pmtu 2014-08-27 17:27:14 +01:00
Matthias Radestock b350924a63 refactor: remove unused field 2014-08-27 16:33:21 +01:00
Matthias Radestock a6eea3405a comment 2014-08-27 15:24:10 +01:00
Matthias Radestock cb2cdc90cc introduce abstraction for packet i/o 2014-08-20 11:18:12 +01:00
Matthias Radestock e6feefa1fc initial commit 2014-08-18 17:55:26 +01:00