5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-15 22:30:30 +00:00
Commit Graph

103 Commits

Author SHA1 Message Date
Arceliar
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
Neil Alexander
870b2b6a2e
Remove CKR from src/yggdrasil (it will be moved into tuntap) 2019-04-23 10:28:40 +01:00
Neil Alexander
e1a2d666bf
Clean up router, tweaks 2019-04-22 23:12:13 +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
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
39baf7365c
Unexport/modify some interfaces to revive broken iOS/Android builds 2019-03-30 00:09:35 +00:00
Neil Alexander
f19a4e4398
More godoc improvements 2019-03-29 18:18:31 +00:00
Neil Alexander
b5ac65cacb
Rearrange public interface, godoc improvements 2019-03-29 18:05:17 +00:00
Neil Alexander
a830521078
Don't crash if Yggdrasil is started with no router adapter 2019-03-29 08:38:09 +00:00
Neil Alexander
dd05a7f2a8
Tweaks 2019-03-28 19:09:19 +00:00
Neil Alexander
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
Neil Alexander
0b494a8255
Refactoring: move tuntap and icmpv6 into separate package 2019-03-28 00:30:25 +00:00
Neil Alexander
61774aed3b
Show proto in admin socket, link linkInfo from peer, other fixes 2019-03-04 20:33:08 +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
2f8dd5dde0 remove race condition in setting peer.close by requiring it as an argument to newPeer 2019-02-03 15:50:25 -06:00
Neil Alexander
0838928668
Add support for flexible logging levels 2019-01-27 13:31:43 +00:00
Neil Alexander
c85dbaea95
Fix missing nodeinfo.init 2019-01-16 13:23:26 +00:00
Neil Alexander
9e486ed4fe
Move nodeinfo into router 2019-01-14 19:05:16 +00:00
Neil Alexander
5cde3b5efc
Update nodeinfo in router reconfigure 2019-01-14 18:51:49 +00:00
Neil Alexander
9e186bdd67
Remove mutexes from CKR and use router goroutine/doAdmin for update config 2019-01-14 18:34:15 +00:00
Neil Alexander
bd04124e43
Reconfigure support for crypto-key routing 2019-01-14 18:06:41 +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
dfcdafa55c move special peer/dht insert logic form router.go to dht.go 2018-12-20 17:37:59 -06:00
Arceliar
28c7d75a20 fix conflicts with nodeinfo and update that for new crypto type names 2018-12-15 18:11:02 -06:00
Neil Alexander
e0ff3ca587
Rename Metadata to NodeInfo 2018-12-15 22:37:11 +00:00
Arceliar
ea4ca02681 fix code after moving address/crypto/util 2018-12-14 20:49:18 -06:00
Neil Alexander
cdd2e7910a
Merge remote-tracking branch 'origin/develop' into metadata 2018-12-15 00:48:54 +00:00
Neil Alexander
d5031a5cb6
Metadata exchange without sessions 2018-12-15 00:48:27 +00:00
Neil Alexander
f9dc300787
Define Adapter base type/interface 2018-12-14 18:29:00 +00:00
Neil Alexander
8045cb4dc3
Define generic adapter type, rename tunDevice to tunAdapter 2018-12-14 18:21:08 +00:00
Neil Alexander
2a38ad07cd
Don't send ICMPv6 back when tun disabled 2018-12-14 18:08:40 +00:00
Neil Alexander
9eaa2566c1
Parameterise tun.init 2018-12-14 18:08:13 +00:00
Neil Alexander
10157483f9
Move tunDevice into router 2018-12-14 17:35:02 +00:00
Neil Alexander
64060a447c
Remove metadata-peer association until we have some sensible way to cache it 2018-12-12 22:58:16 +00:00
Neil Alexander
74de8c9416
Consistent function naming for metadata 2018-12-12 22:48:04 +00:00
Neil Alexander
042a3400fe
Wrap the metadata with a mutex to guarantee thread safety across core/router/sessions 2018-12-12 22:40:49 +00:00
Neil Alexander
97464feba9
Working metadata exchange 2018-12-12 19:51:28 +00:00
Neil Alexander
6200136fce
Merge branch 'descriptive' into metadata 2018-12-12 18:04:49 +00:00
Arceliar
9046dbde4f remove sigManager, it seems safer to just burn the CPU than to store a map of strings of potentially arbitrary length 2018-11-25 13:06:54 -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
Arceliar
8cf8b0ec41 fix bug in recvPacket for packets coming from a subnet 2018-11-11 00:00:47 -06:00
Neil Alexander
685b565512
Check IP header lengths correctly per protocol 2018-11-07 10:29:08 +00:00
Neil Alexander
9542bfa902
Check the session perm pub key against the CKR key 2018-11-07 10:16:46 +00:00
Neil Alexander
fbfae473d4
Use full node ID for CKR routes instead of truncated node IDs from the address/subnet 2018-11-07 10:04:31 +00:00