Jason Rhinelander
bce7e2e56d
Pump outbound context
2021-11-15 13:38:21 -04:00
Jason Rhinelander
846577a0aa
Add missing inbound traffic pump trigger
2021-11-15 13:38:10 -04:00
Jason Rhinelander
8cdde74020
Simplify
2021-11-15 13:38:08 -04:00
Jason Rhinelander
f9395cd5dd
Cleanup: avoid pointless copy of this
pointer
2021-11-15 13:38:00 -04:00
Jason Rhinelander
9844d358e6
Fix packet delay creep
...
- Make the main PumpLL also pump hidden services, rather than using
separate wakers in each TunEndpoint. It seems there is some
interactions that just one or the other is not enough.
- Eliminate TunEndpoint send queue -- it isn't needed as we can just
send directly.
2021-11-15 13:37:57 -04:00
Jason Rhinelander
78cc466bf2
Rename PumpLL -> TriggerPump
...
And rename the actual pump implementation back to PumpLL.
2021-11-15 13:37:47 -04:00
Jason Rhinelander
031ea7aa37
Get rid of external event loop direct wakeups
...
If something needs to wake up the event loop it should be using an
async, as we are now with PumpLL(); but we had various code triggering a
wakeup, expecting that PumpLL gets called on every wakeup, which isn't
true anymore.
2021-11-15 13:36:44 -04:00
Jeff
1846c3e3d8
prevent bizare half open state. ( #1754 )
...
* attempt path timeout bullshittery fix
* make sure ServiceInfo always has its address set up
* do not copy intros in constuctor, ammend logging and
add assert
2021-10-12 17:37:01 -04:00
Jason Rhinelander
9dd604820f
Unleak exit mode DNS via unbound DNS trampoline on (macOS)
...
When we enable/disable exit mode on this restarts the unbound DNS
responder with the DNS trampoline (or restores upstream, when disabling)
to properly route DNS requests through the tunnel (because libunbound's
direct requests don't get tunneled because unbound is inside the network
extension).
2021-09-02 14:17:10 -04:00
Jeff Becker
e7ac0f3902
expunge outbound contexts that have not gotten inbound traffic for a long while
2021-07-05 09:09:20 -04:00
Jeff Becker
abd6e4c558
use weak_ptr instead of bare pointer to prevent use after free
2021-06-25 05:08:31 -04:00
Jeff Becker
3ad59105ef
when an outbound context is "marked bad" we want to ignore any new paths.
...
before this commit when a new path was made when an outbound context marked bad lokinet would segfault.
2021-06-23 07:21:01 -04:00
Jeff Becker
67f8a7116f
if we get a discard message from the pivot discard the outbound context if the remote intro is also expired
2021-06-21 16:02:03 -04:00
Jeff Becker
0900ab88d1
publish introsets on nearest routers
...
fetch introset from random routers
2021-06-21 16:01:38 -04:00
Jeff Becker
ee5723ecdc
add upperbound to number of endpoints used in lns lookups
2021-06-21 15:16:28 -04:00
Jeff Becker
3393b5a5a7
make it so lookups dont time out
2021-06-21 15:16:27 -04:00
Jeff Becker
b5efb8c604
rename local variable to be clear about meaning, add comment
2021-06-21 15:16:27 -04:00
Jeff Becker
1a0e6a7ac1
remove redundant check as ReadyToSend also checks IntroSent()
2021-06-21 15:16:27 -04:00
Jeff Becker
d45f0f8951
value initialize introduction so that expiresAt defaults to zero
2021-06-21 15:16:27 -04:00
Jeff Becker
9f353238af
ReadyToSend also should include checking we have a path to the remote
2021-06-21 15:16:27 -04:00
Jeff Becker
4b11858bb0
make clang compile, remove unused variable
2021-06-21 15:16:27 -04:00
Jeff Becker
963250c0ef
format
2021-06-21 15:16:27 -04:00
Jeff Becker
00d4942d85
more
2021-06-21 15:16:26 -04:00
Thomas Winget
7f9a60066b
make sure we have a path to the next introduction we want to use
2021-06-21 15:16:26 -04:00
Jeff Becker
d9cae4a6c6
in outbound context, ShouldBuildMore intro.ExpiresSoon delta is too big and has no overlap, change it so that
2021-06-21 15:16:26 -04:00
Jeff Becker
e48feb8b9a
kill outbound context when we remove our convotag
2021-06-21 15:16:26 -04:00
Jeff Becker
71d17dc2c9
format and logging
...
ignore outbound session auth messages
2021-06-21 15:16:26 -04:00
Jeff Becker
b70ecade2b
correct the logic for inbound convos
...
send back traffic on the correct path
2021-06-21 15:16:25 -04:00
Jeff Becker
ce7643a3aa
remove case that spams build on an outbound context
2021-06-09 09:36:08 -04:00
Jeff Becker
c97fe4aa96
convert magic number to where it came from
2021-06-08 18:07:54 -04:00
Jeff Becker
3594d3e211
spelling fix
2021-06-08 17:54:40 -04:00
Jeff Becker
f9e0c8f50c
add idempotent wakeup for flushing instead of the dumb queue checking
2021-06-08 17:38:04 -04:00
Jeff Becker
e2bdf8792b
typofix
2021-06-08 17:27:50 -04:00
Jeff Becker
5a713b0142
tweak timeouts to be a bit more sane
2021-06-08 14:36:33 -04:00
Jeff Becker
c2722be81c
this fixes the shit wtf
2021-06-08 14:36:33 -04:00
Jeff Becker
5909ad0386
add MarkAddressOutbound to plainquic
2021-06-08 14:36:33 -04:00
Jeff Becker
cce15b13c8
dont establish paths to inbound sessions to try and address state race condition
2021-06-08 14:36:33 -04:00
Jeff Becker
aefab797d7
unconditional putsenderfor
2021-06-08 14:36:33 -04:00
Jeff Becker
0096bd4e35
account for path latency in introset lookups on outbound contexts
2021-06-08 14:36:32 -04:00
Jeff Becker
e4ed53224c
use weak_ptr on a path to reference its parent pathset instead of a bare pointer so crashes dont happen
2021-06-08 14:36:32 -04:00
Jeff Becker
c6660dd6c1
add path aligntment timeout to send and connect timeouts on outbound context to reduce the chance of timing race conditon
2021-06-08 14:36:32 -04:00
Jeff Becker
108b8e089e
HandleTimeout can touch iterators so do all handling of lookup timeouts outside of loop iteration
2021-06-08 14:36:32 -04:00
Jeff Becker
0f1e806155
don't kill outbound context after build or lookup fails
2021-06-08 14:36:32 -04:00
Jeff Becker
a7b20b79c5
add relay order to error message
2021-06-08 14:36:31 -04:00
Jeff Becker
34e31ba04f
only inform failure or success of introset lookups when all lookups have returned
2021-06-08 14:36:31 -04:00
Jeff Becker
220b8837da
delay setting sentIntro by the advertised latency of the remote intro instead of static value
2021-06-08 14:36:31 -04:00
Jeff Becker
c5a86a49a3
defer ready to send state until after we send a handshake
2021-06-08 14:36:31 -04:00
Jeff Becker
40a189a9a3
log drop events more
2021-06-08 14:36:31 -04:00
Jeff Becker
00257567c2
dont call null handler
...
if we have no path to the remote router that's fine still use it just in case we have no other convotags
2021-06-08 14:36:31 -04:00
Jeff Becker
85cd1b6863
use inbound sessions we don't have paths to in GetBestConvoTagFor just so we can give the caller SOMETHING.
2021-06-08 14:36:31 -04:00