4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-06-16 04:26:04 +00:00
Commit Graph

885 Commits

Author SHA1 Message Date
1addf08ccd don't have Conn.Read return an error for temorary crypto failures from e.g. out of order packets, just drop the packet and keep blocking until there's usable traffic 2019-05-31 17:51:01 -05:00
9e086e70f0 Don't indefinitely block TUN/TAP reader goroutine when a conn error happens 2019-05-30 12:44:47 +01:00
0096d1ae3e Re-add ICMPv6 packet too big handling 2019-05-29 20:16:17 +01:00
3b6c726a3c Fix bug where MTU was ignored by sessions, resulting in default 1280 2019-05-29 19:11:12 +01:00
78eb40cbad Record session uptime (purely for the admin socket) 2019-05-29 12:59:36 +01:00
5ea864869a don't spam searches for unused connections. todo: timeout old connections somehow 2019-05-23 20:27:52 -05:00
5b8d8a9341 Reimplement getNodeInfo, dhtPing, get/add/removeAllowedEncryptionPublicKey, add/removePeer 2019-05-20 19:51:44 +01:00
8ef1978cb1 Start factoring out the admin socket into a separate module (not all functions implemented yet) 2019-05-19 17:27:48 +01:00
7ca5a2533d Implement GetDHT, GetSwitchQueues, GetSessions 2019-05-19 16:29:04 +01:00
8a6f6f3b2b Implement GetPeers and GetSwitchPeers API functions in Core, in preparation for breaking out the admin socket into a separate module 2019-05-18 17:21:02 +01:00
ce60609906 Remove wrappedConn as unnecessary 2019-05-18 16:16:32 +01:00
ae2cc13d14 Fix configuration reloading support 2019-05-17 22:29:52 +01:00
9c01947b1c reduce allocations in switch 2019-05-16 18:10:47 -05:00
522ed147b1 use the subnet derived ID/mask when creating a connection based on a subnet address, fix a potential blocking channel send in tuntap/conn.go, and get debug.go compiling well enough to profile things (the sim is currently still broken) 2019-05-15 18:01:26 -05:00
6469e39ff1 workaround to random timeouts 2019-04-26 22:42:05 -05:00
5d323861f0 properly fix the memory errors, it was caused by a function returning and PutBytes-ing a buffer before a worker had a chance to decrypt the buffer, so it would GetBytes the same buffer by dumb luck and then get an illegal overlap 2019-04-26 22:21:31 -05:00
01ea6d3d80 somehow this doesn't seem to deadlock or crash from buffer reuse (util.PutBytes), but I have no idea why it was doing that before and not now 2019-04-26 21:49:11 -05:00
15051b0a3c Add deadline timers, keep searches alive until they complete (or the conn is closed) to keep Write from blocking forever 2019-04-26 19:31:47 -05:00
0059baf36c add a newConn function that returns a pointer to a Conn with atomics properly initialized 2019-04-26 18:07:57 -05:00
75130f7735 Fix TAP support again 2019-04-23 11:46:16 +01:00
870b2b6a2e Remove CKR from src/yggdrasil (it will be moved into tuntap) 2019-04-23 10:28:40 +01:00
d7a1c04748 It works, sort of, amazingly 2019-04-22 23:58:59 +01:00
e1a2d666bf Clean up router, tweaks 2019-04-22 23:12:13 +01:00
6e528799e9 Conn Read/Write operations will block while search completes 2019-04-22 22:38:37 +01:00
ea8948f378 TUN/TAP addr/subnet to Conn mappings, other fixes 2019-04-22 20:06:39 +01:00
9778f5d2b8 Fix search behaviour on closed Conns, various other fixes 2019-04-22 15:00:19 +01:00
bbd1246f7b Fix bug in mask generation for outbound dials, change iface reader mutexes to read-only locks unless RW is needed 2019-04-22 11:49:47 +01:00
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
5a02e2ff44 apparently it was these callbacks that were sometimes deadlocking things 2019-04-21 22:31:56 -05:00
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
0b8f5b5dda Tweaks 2019-04-21 12:28:46 +01:00
781cd7571f Fix race on tun conns, but still deadlocks if more than one connection is opened 2019-04-21 12:00:31 +01:00
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
62621f2960 Some tweaks 2019-04-20 20:22:58 +01:00
d01662c1fb Try to convert TUN/TAP to use new yggdrasil.Conn, search masks are still broken 2019-04-20 16:32:27 +01:00
f3e742a297 Squash a whole load of races (and mutex half the world) 2019-04-20 11:53:38 +01:00
24281d4049 Fix Read, update sample 2019-04-19 23:47:11 +01:00
e31b914e38 Improve errors and handling of expired sessions 2019-04-19 23:30:43 +01:00
7e726b0afb Listener should clean up a bit more when closing 2019-04-19 23:04:09 +01:00
aac88adbed Listen-Accept-Read-Write pattern now works, amazingly 2019-04-19 22:57:52 +01:00
27b78b925d Move mutexes around 2019-04-19 21:23:15 +01:00
e3eadba4b7 Protect session nonces with mutexes, modify sent/received bytes atomically 2019-04-19 20:10:41 +01:00
ade684beff Signal when a session is closed, other tweaks 2019-04-19 10:55:15 +01:00
c593721362 Tweaks 2019-04-19 00:33:54 +01:00
b20c8b6da5 Move some things around a bit, delete session workers 2019-04-19 00:11:43 +01:00
b2f4f2e1b6 Update errors, update Write 2019-04-19 00:07:26 +01:00
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
eef2a02d0a Experiment with new API 2019-04-18 16:38:24 +01:00
24fa8355f1 Merge pull request #401 from neilalexander/modular
Refactoring for Yggdrasil library
2019-04-17 18:35:10 +01:00
4488189a75 wire: cleaner and faster wire_intToUint and wire_intFromUint
Bit operations are much faster on most processors than multiplication.
Also specify that it's zigzag to ease finding additional documentation for it.
2019-04-06 21:34:47 +03:00