Arceliar
|
e0a3055c2f
|
get rid of session workers, new util.PutBytes/GetBytes logic
|
2019-07-27 18:10:32 -05:00 |
|
Arceliar
|
cd29fde178
|
temporary workaround to concurrency bug in sessions.getSharedKey
|
2019-06-29 19:32:15 -05:00 |
|
Arceliar
|
7d58a7ef3e
|
fix channel multiple close bug and concurrency bug in the way sessionInfo.close was being called
|
2019-06-29 17:44:28 -05:00 |
|
Arceliar
|
818eca90db
|
fix nil pointer deref if searches fail, block dial until a search exceeds or a timeout passes (todo: replace timer with context)
|
2019-06-29 16:10:02 -05:00 |
|
Arceliar
|
e88bef35c0
|
get rid of old buffered session packets
|
2019-06-28 20:02:58 -05:00 |
|
Arceliar
|
e7cb76cea3
|
clean up unused old session maps
|
2019-06-28 19:21:44 -05:00 |
|
Neil Alexander
|
f545060e89
|
Add notes on isSessionAllowed checks
|
2019-06-13 23:37:53 +01:00 |
|
Neil Alexander
|
720a078a35
|
Add SetSessionGatekeeper
This allows you to define a function which determines whether a session connection (either incoming or outgoing) is allowed based on the public key.
|
2019-06-11 10:52:21 +01:00 |
|
Neil Alexander
|
3b6c726a3c
|
Fix bug where MTU was ignored by sessions, resulting in default 1280
|
2019-05-29 19:11:12 +01:00 |
|
Neil Alexander
|
78eb40cbad
|
Record session uptime (purely for the admin socket)
|
2019-05-29 12:59:36 +01:00 |
|
Arceliar
|
0059baf36c
|
add a newConn function that returns a pointer to a Conn with atomics properly initialized
|
2019-04-26 18:07:57 -05:00 |
|
Neil Alexander
|
75130f7735
|
Fix TAP support again
|
2019-04-23 11:46:16 +01:00 |
|
Neil Alexander
|
d7a1c04748
|
It works, sort of, amazingly
|
2019-04-22 23:58:59 +01:00 |
|
Neil Alexander
|
ea8948f378
|
TUN/TAP addr/subnet to Conn mappings, other fixes
|
2019-04-22 20:06:39 +01:00 |
|
Neil Alexander
|
9778f5d2b8
|
Fix search behaviour on closed Conns, various other fixes
|
2019-04-22 15:00:19 +01:00 |
|
Neil Alexander
|
47eb2fc47f
|
Break deadlock by creating session recv queue when session is created instead of repointing at search completion, also make expired atomic
|
2019-04-22 11:20:35 +01:00 |
|
Arceliar
|
5dada3952c
|
use a session worker to try to avoid mutex hell. compiles, but incomplete and doesn't work yet
|
2019-04-21 20:38:14 -05:00 |
|
Neil Alexander
|
79bcfbf175
|
Change some mutexes to atomics, change conns map to pointers, sort of works but seems to deadlock very easily
|
2019-04-21 11:50:41 +01:00 |
|
Neil Alexander
|
d01662c1fb
|
Try to convert TUN/TAP to use new yggdrasil.Conn, search masks are still broken
|
2019-04-20 16:32:27 +01:00 |
|
Neil Alexander
|
f3e742a297
|
Squash a whole load of races (and mutex half the world)
|
2019-04-20 11:53:38 +01:00 |
|
Neil Alexander
|
e31b914e38
|
Improve errors and handling of expired sessions
|
2019-04-19 23:30:43 +01:00 |
|
Neil Alexander
|
aac88adbed
|
Listen-Accept-Read-Write pattern now works, amazingly
|
2019-04-19 22:57:52 +01:00 |
|
Neil Alexander
|
27b78b925d
|
Move mutexes around
|
2019-04-19 21:23:15 +01:00 |
|
Neil Alexander
|
e3eadba4b7
|
Protect session nonces with mutexes, modify sent/received bytes atomically
|
2019-04-19 20:10:41 +01:00 |
|
Neil Alexander
|
ade684beff
|
Signal when a session is closed, other tweaks
|
2019-04-19 10:55:15 +01:00 |
|
Neil Alexander
|
b20c8b6da5
|
Move some things around a bit, delete session workers
|
2019-04-19 00:11:43 +01:00 |
|
Neil Alexander
|
b2f4f2e1b6
|
Update errors, update Write
|
2019-04-19 00:07:26 +01:00 |
|
Neil Alexander
|
160e01e84f
|
Searches called from api.go, various other tweaks, searches now have a callback for success/failure, node ID now reported by admin socket
|
2019-04-18 23:38:23 +01:00 |
|
Neil Alexander
|
58f5cc88d0
|
Fix session bug, fix dummy adapter, fix mobile framework builds
|
2019-04-01 19:59:50 +01:00 |
|
Neil Alexander
|
dd05a7f2a8
|
Tweaks
|
2019-03-28 19:09:19 +00:00 |
|
Neil Alexander
|
0b494a8255
|
Refactoring: move tuntap and icmpv6 into separate package
|
2019-03-28 00:30:25 +00:00 |
|
Arceliar
|
304f22dc1d
|
re-enable session workers in a way that doesn't block and drops packets before decrypting if necessary
|
2019-02-28 20:05:21 -06:00 |
|
Arceliar
|
042adb0516
|
make sure the only place traffic is ever dropped is in the switch. this currently disables the dedicated crypto workers
|
2019-02-23 00:07:00 -06:00 |
|
Arceliar
|
bca69df1f6
|
possible workaround to a deadlock
|
2019-01-26 14:07:18 -06:00 |
|
Neil Alexander
|
62d4d62a77
|
Update comments
|
2019-01-21 16:24:29 +00:00 |
|
Neil Alexander
|
d3f67ad017
|
Improve command flow
|
2019-01-21 16:22:49 +00:00 |
|
Neil Alexander
|
cdfb930703
|
Update switch flow separation for IPv4
|
2019-01-21 12:27:29 +00:00 |
|
Neil Alexander
|
9d5085492e
|
Handle session firewall using central config
|
2019-01-16 20:38:51 +00:00 |
|
Neil Alexander
|
2cd373fc1e
|
Remove unnecessary selects
|
2019-01-15 08:51:19 +00:00 |
|
Neil Alexander
|
51026d762e
|
Make session firewall thread-safe for config updates
|
2019-01-14 18:24:35 +00:00 |
|
Neil Alexander
|
7fae1c993a
|
Handle errors from reconfigure tasks
|
2018-12-30 12:04:42 +00:00 |
|
Neil Alexander
|
219fb96553
|
Support notifying components for config reload, listen for SIGHUP
|
2018-12-29 18:51:51 +00:00 |
|
Arceliar
|
ea4ca02681
|
fix code after moving address/crypto/util
|
2018-12-14 20:49:18 -06:00 |
|
Neil Alexander
|
10157483f9
|
Move tunDevice into router
|
2018-12-14 17:35:02 +00:00 |
|
Arceliar
|
4e156bd4f7
|
better cleanup of maps
|
2018-11-25 12:25:38 -06:00 |
|
Arceliar
|
5fa23b1e38
|
move router.recvPacket calls into the main router goroutine, to make the ckr checks threadsafe
|
2018-11-20 22:04:18 -06:00 |
|
Neil Alexander
|
fc5a5830aa
|
Merge pull request #203 from Arceliar/chord
Chord
|
2018-11-14 20:13:42 +00:00 |
|
Neil Alexander
|
c7f2427de1
|
Check CKR routes when receiving packets in router
|
2018-11-05 22:58:58 +00:00 |
|
Arceliar
|
03a88fe304
|
Try using a chord-like DHT instead of a kad-like one, work in progress, but it compiles at least
|
2018-10-20 14:48:07 -05:00 |
|
Neil Alexander
|
3ed63ede1e
|
Add AlwaysAllowOutbound to session firewall
|
2018-10-08 19:51:51 +01:00 |
|
Neil Alexander
|
3f237372c9
|
Only apply session firewall to pings for sessions we don't already have
|
2018-10-08 19:05:50 +01:00 |
|
Neil Alexander
|
2e2c58bfef
|
Add session firewall (extra security for controlling traffic flow to/from a given node)
|
2018-10-07 17:13:41 +01:00 |
|
cathugger
|
b4db89ea9d
|
Avoid unnecessarily allocating coords slice if it's unchanged.
|
2018-07-30 13:44:46 +00:00 |
|
cathugger
|
67b8a7a53d
|
Ensure no memory allocations happen at hot path
|
2018-07-30 12:43:34 +00:00 |
|
Neil Alexander
|
c4e6894d6a
|
Copy sinfo.coords for safety
|
2018-07-30 13:34:32 +01:00 |
|
Neil Alexander
|
ebb4ec7c33
|
Clean up the flow a bit (partly because I am allergic to huge compounded if statements)
|
2018-07-30 11:46:44 +01:00 |
|
cathugger
|
68a482ed92
|
Simplify flowkey stuff further.
|
2018-07-30 02:15:57 +00:00 |
|
cathugger
|
36dcab9300
|
optimize wire_put_uint64; use protokey for flowlabel fallback.
|
2018-07-30 01:58:52 +00:00 |
|
cathugger
|
fec7100898
|
Clean up / clarify coords sending code.
|
2018-07-30 00:01:37 +00:00 |
|
cathugger
|
11b0a82c4a
|
Simpler flowlabel parsing; avoid using 0 flowlabel.
|
2018-07-29 22:09:16 +00:00 |
|
Neil Alexander
|
38e8b036d2
|
Use addUint64 instead to not interfere with coordinate parsing
|
2018-07-22 18:33:53 +01:00 |
|
Neil Alexander
|
81fde1a805
|
Use flow label instead of TCP/UDP/SCTP source/destination ports
|
2018-07-22 18:16:03 +01:00 |
|
Neil Alexander
|
3f4295f8cd
|
Only split queues based on port number for TCP/UDP/SCTP, rely only on protocol number for other protos to prevent issues with IPIP, GRE, etc
|
2018-07-22 12:00:40 +01:00 |
|
Arceliar
|
9cbcaf39ac
|
Use coords for queue stream IDs in the switch, and append protocol/port information to coords when sending, to designate different streams
|
2018-07-21 18:59:29 -05:00 |
|
Arceliar
|
5dfa01a0e8
|
periodically clean up timed-out sessions and old signatures, instead of trying to do it when creating new sessions or adding new signatures
|
2018-06-21 20:31:30 -05:00 |
|
Arceliar
|
f7a7f601a0
|
cleanup old ugly session MTU code that only mattered with lossy UDP fragments
|
2018-06-14 08:38:43 -05:00 |
|
Arceliar
|
b006748da4
|
code cleanup
|
2018-06-12 17:50:08 -05:00 |
|
Arceliar
|
56802d569e
|
minor documentation updates, code comments, and a couple of bugfixes that I noticed when going through the code to comment it
|
2018-06-10 18:03:28 -05:00 |
|
Arceliar
|
bced15b138
|
remove TTL from traffic packets
|
2018-06-07 20:29:22 -05:00 |
|
Neil Alexander
|
bbdcee1015
|
Export fields of sessionPing, dhtReq, dhtRes
|
2018-06-02 22:19:42 +01:00 |
|
Neil Alexander
|
49af65296d
|
Export fields of wire structs
|
2018-06-02 21:21:05 +01:00 |
|
Neil Alexander
|
ca96bbf014
|
Accept exchanging an MTU of 0 to signify that TUN/TAP is disabled, don't send traffic to a node in that case
|
2018-05-18 18:56:33 +01:00 |
|
Neil Alexander
|
ec371af84f
|
Track TX/RX bytes over session and if MTU was adjusted, add to admin socket getSession
|
2018-05-18 17:59:29 +01:00 |
|
Arceliar
|
8ef2e55de6
|
try sending pings before sending searches for an unresponsive session
|
2018-04-22 15:31:30 -05:00 |
|
Arceliar
|
63b55cda62
|
Mostly working PMTU discovery when going over UDP links
|
2018-02-25 20:24:36 -06:00 |
|
Arceliar
|
bb3ae8b39b
|
temporarily limit PMTU to 2048, as a workaround to some pathelogical behavior where a TCP stream carried over a UDP peer can throttle down to 0 in the presence of significant packet loss
|
2018-02-23 12:46:22 -06:00 |
|
Neil Alexander
|
366d2af1d3
|
Fix first queued packet on session pcreation
|
2018-02-15 18:02:08 +00:00 |
|
Neil Alexander
|
7a0b48ffb3
|
Clean up session.go
|
2018-02-12 00:01:15 +00:00 |
|
Neil Alexander
|
536974f20c
|
Try to exchange MTUs when creating sessions
|
2018-02-11 23:09:05 +00:00 |
|
Arceliar
|
63aadf6e88
|
use smaller buffer sizes for buffered channels
|
2018-02-03 18:44:28 -06:00 |
|
Arceliar
|
c18d863a3e
|
update comments, mostly TODO/FIXME notes
|
2018-01-26 17:30:51 -06:00 |
|
Arceliar
|
502ab3cfaa
|
check that the source IP inside a packet matches the address or prefix for the session that transmitted it
|
2018-01-19 17:33:04 -06:00 |
|
Arceliar
|
75965b6da4
|
Switch connAddr (udp map key) from string to a struct that allocates less. Reduce some other allocations. Use larger channel buffers to reduce backpressure from runtime jitter.
|
2018-01-13 07:26:26 -06:00 |
|
Neil Alexander
|
b3ebe76b59
|
Run gofmt -s -w .
|
2018-01-04 22:37:51 +00:00 |
|
Arceliar
|
d7e6d814a0
|
first code/readme/license commit
|
2017-12-28 22:16:20 -06:00 |
|