4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-07-03 02:37:46 +00:00
Commit Graph

126 Commits

Author SHA1 Message Date
aa30c6cc98 upgrade phony dependency and switch to its new interface 2019-08-25 10:36:09 -05:00
88161009e9 more peer migration 2019-08-24 12:55:49 -05:00
e3603c0462 clean up unused session code 2019-08-23 22:25:40 -05:00
533da351f9 fix actor EnqueueFrom stack overflow (use nil now to send from self) and replace session send/recv workers with actor functions 2019-08-23 22:23:01 -05:00
436c84ca33 refactor sessions to store a pointer to router instead of core 2019-08-23 20:53:00 -05:00
5bb85cf07b refactor searches to store a pointer to router instead of core 2019-08-23 20:42:38 -05:00
e7024a00e7 have dht store a pointer to router instead of core 2019-08-23 20:35:54 -05:00
ebd806f27a move router member initialization into router.init 2019-08-23 20:29:16 -05:00
9835c63818 refactor things the router owns (dht, sessions, searches) into that struct, to make the ownership more explicit 2019-08-23 20:26:15 -05:00
bbcbbaf3b1 start migrating sessionInfo to be an actor 2019-08-23 20:05:18 -05:00
8e89816099 more router migration: rename functions that should only be called internally by the actor 2019-08-23 18:59:34 -05:00
232e6d3cb3 more router migration 2019-08-23 18:55:41 -05:00
9d7e7288c6 start migrating the router to an actor 2019-08-23 18:47:15 -05:00
62337bcd64 allow links to send multiple packets at once, currently we still only bother to send 1 at a time from the switch level 2019-08-18 12:17:54 -05:00
790524bd1c copy/paste old flowkey logic into a util function, add a struct of key and packet, make WriteNoCopy accept this instead of a slice 2019-08-06 19:25:55 -05:00
679866d5ff have createSession fill the sessionInfo.cancel field, have Conn use Conn.session.cancel instead of storing its own cancellation, this should prevent any of these things from being both nil and reachable at the same time 2019-08-05 19:11:28 -05:00
84a4f54217 temporary fix to nil pointer, better to make sure it's never nil 2019-08-05 18:49:15 -05:00
f52955ee0f WARNING: CRYPTO DISABLED while speeding up stream writeMsg 2019-08-04 14:18:59 -05:00
1e6a6d2160 use session.cancel in the router to make blocking safe, reduce size of fromRouter buffer so the drops in the switch are closer to the intended front-drop behavior 2019-08-04 02:21:41 -05:00
df0090e32a Add per-session read/write workers, work in progress, they still unfortunately need to take a mutex for safety 2019-08-03 21:46:18 -05:00
377f88512b Remove commented out router function 2019-07-27 15:57:19 +01:00
de1005e4fa Various API changes and simplifications to fix mobile builds 2019-07-27 15:00:09 +01:00
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
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
870b2b6a2e Remove CKR from src/yggdrasil (it will be moved into tuntap) 2019-04-23 10:28:40 +01:00
e1a2d666bf Clean up router, tweaks 2019-04-22 23:12:13 +01: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
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
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
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
39baf7365c Unexport/modify some interfaces to revive broken iOS/Android builds 2019-03-30 00:09:35 +00:00
f19a4e4398 More godoc improvements 2019-03-29 18:18:31 +00:00
b5ac65cacb Rearrange public interface, godoc improvements 2019-03-29 18:05:17 +00:00
a830521078 Don't crash if Yggdrasil is started with no router adapter 2019-03-29 08:38:09 +00:00
dd05a7f2a8 Tweaks 2019-03-28 19:09:19 +00:00
eb22ed44ac Add new reject channel to router so we can send back rejected packets to adapter (e.g. for ICMPv6 Packet Too Big), implement ICMPv6 PTB in TUN/TAP instead of router 2019-03-28 09:50:13 +00:00
0b494a8255 Refactoring: move tuntap and icmpv6 into separate package 2019-03-28 00:30:25 +00:00
61774aed3b Show proto in admin socket, link linkInfo from peer, other fixes 2019-03-04 20:33:08 +00:00
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
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
2f8dd5dde0 remove race condition in setting peer.close by requiring it as an argument to newPeer 2019-02-03 15:50:25 -06:00
0838928668 Add support for flexible logging levels 2019-01-27 13:31:43 +00:00
c85dbaea95 Fix missing nodeinfo.init 2019-01-16 13:23:26 +00:00
9e486ed4fe Move nodeinfo into router 2019-01-14 19:05:16 +00:00
5cde3b5efc Update nodeinfo in router reconfigure 2019-01-14 18:51:49 +00:00
9e186bdd67 Remove mutexes from CKR and use router goroutine/doAdmin for update config 2019-01-14 18:34:15 +00:00
bd04124e43 Reconfigure support for crypto-key routing 2019-01-14 18:06:41 +00:00
7fae1c993a Handle errors from reconfigure tasks 2018-12-30 12:04:42 +00:00
219fb96553 Support notifying components for config reload, listen for SIGHUP 2018-12-29 18:51:51 +00:00