5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-23 02:01:36 +00:00
Commit Graph

98 Commits

Author SHA1 Message Date
Neil Alexander
d06c40ad19
Use existing constant 2019-11-20 22:40:48 +00:00
Neil Alexander
9fca3640f9
Fix couple of issues with MTU calculations 2019-11-20 22:11:52 +00:00
Neil Alexander
f49d9de421
Fix setting up of MTU when value is outside of acceptable bounds, also account for ethernet headers in calculations, notify about clipping to stdout 2019-11-19 14:20:11 +00:00
Neil Alexander
cd93969930
Fix isOpen for TUN/TAP actor 2019-10-24 23:37:39 +01:00
Neil Alexander
a072e063d8
Define module.Module interface, update admin/tuntap/multicast modules to comply with it, fix #581 2019-10-23 10:44:58 +01:00
Arceliar
eccd9a348f give yggdrasil.Dialer the same interface as a net.Dialer, so the only differences are what fields exist in the struct 2019-10-21 19:44:06 -05:00
Arceliar
efc0b9ef9f Merge branch 'develop' into netconn 2019-10-21 18:47:40 -05:00
Arceliar
a81476f489 fix incorrectly held mutex in ckr getPublicKeyForAddress 2019-10-20 20:00:55 -05:00
Arceliar
cb40874f97 have listener return a net.Conn, adjust yggdrasil.Conn to match this interface 2019-10-19 15:10:28 -05:00
Arceliar
b2922189b8 fix deadlock from use of phony.Block by actors when ckr is enabled 2019-10-03 18:44:47 -05:00
Arceliar
0f99d590a1 typo, ipv6->ipv4 2019-09-26 18:15:26 -05:00
Arceliar
e16d3efb0a check packet length before checking if it's an ipv6 packet, and add some trace level logging whenever a packet is rejected for being too short to parse 2019-09-26 18:11:58 -05:00
Neil Alexander
94cf2854a9
Fix panic where slice goes out of bounds because iface.Read returns less than zero (which might happen when the TUN/TAP interface is closed) 2019-09-18 19:48:53 +01:00
Arceliar
8d2c31d39c add some artifical delay to windows netsh commands, since it seems like maybe they don't take effect immediately, and this was leading to races when setting MTU 2019-09-01 13:20:48 -05:00
Arceliar
c53831696b make tun stop check that iface is not nil, in case it wasn't set for some reason (windows bugs) 2019-09-01 13:06:25 -05:00
Neil Alexander
fc9a1c6c31
Simplify reconfiguration 2019-08-28 19:31:04 +01:00
Neil Alexander
5d7d84f827
Remove router.doAdmin and switchTable.doAdmin 2019-08-28 12:17:19 +01:00
Arceliar
3845f81357 update to latest phony, adjust interface use accordingly 2019-08-27 19:43:54 -05:00
Arceliar
c97dd4ad28 fix dial bug 2019-08-26 00:38:14 -05:00
Arceliar
b2a2e251ad more TunAdapter migration 2019-08-25 18:53:11 -05:00
Arceliar
aaf34c6304 start migrating the TunAdapter to the actor model 2019-08-25 18:08:43 -05:00
Arceliar
502f2937a9 a couple race fixes and use timer.AfterFunc instead of sleeping goroutines or ticker in a few places 2019-08-25 17:00:02 -05:00
Arceliar
aa30c6cc98 upgrade phony dependency and switch to its new interface 2019-08-25 10:36:09 -05:00
Arceliar
ef15a6bd79 tunConn cleanup 2019-08-24 11:44:21 -05:00
Arceliar
4893a07696 start migrating tunConn to the actor model 2019-08-24 11:38:47 -05:00
Arceliar
4156aa3003 move ckr checks into the tunConn code 2019-08-20 18:10:08 -05:00
Neil Alexander
b6e67bc0ba
Check CKR remotes when receiving traffic 2019-08-20 09:38:46 +01:00
Neil Alexander
2b6462c8a9
Strict checking of Yggdrasil source/destination addresses 2019-08-20 09:38:27 +01:00
Neil Alexander
2a629880fd
Rename crypto-key config options, improve control flow 2019-08-19 10:28:30 +01:00
Neil Alexander
4702da2bcb
Use new netlink library (fixes #493) 2019-08-14 19:32:40 +01:00
Arceliar
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
Arceliar
6803f209b0 have tuntap code use Conn.ReadNoCopy and Conn.WriteNoCopy to avoid copying between slices 2019-08-04 15:59:51 -05:00
Arceliar
75b931f37e eliminate some more copying between slices 2019-08-04 14:50:19 -05:00
Arceliar
7bf5884ac1 remove some lossy channel sends that should be safe to allow to block 2019-08-04 02:14:45 -05:00
Neil Alexander
853054eb62
Merge pull request #475 from Arceliar/misc
Misc
2019-07-29 20:24:49 +01:00
Arceliar
406e143f7f move some logic from TunAdapter.reader into a new function, TunAdapter.readerPacketHandler 2019-07-28 23:33:04 -05:00
Neil Alexander
7c4c1558ff
Merge pull request #474 from neilalexander/gomobile
Various API changes and simplifications to fix mobile builds
2019-07-28 19:34:06 +01:00
Arceliar
38e1503b28 split up some of the tun reader logic into a separate worker, so the main loop can be mostly just syscalls 2019-07-27 20:09:43 -05:00
Neil Alexander
de1005e4fa
Various API changes and simplifications to fix mobile builds 2019-07-27 15:00:09 +01:00
Neil Alexander
195d577151
Add IFF_NODAD/IFF_SECURED, define consts 2019-07-27 13:30:47 +01:00
Neil Alexander
de9d0a6cf1
Redirect Conn session closure errors to debug channel 2019-07-22 22:41:55 +01:00
Neil Alexander
48ad3c5d7f
Update water go.mod references, fix some bugs in TAP mode (which should hopefully fix Windows support too) 2019-07-20 16:13:54 +01:00
Neil Alexander
36201895e7
Don't mangle bs slice in TAP mode 2019-07-20 12:10:05 +01:00
Neil Alexander
2582df752d
Fix resetting Windows adapter (reverting previous change) 2019-07-20 11:43:30 +01:00
Neil Alexander
1a5c2a4942
Update Windows module a bit - capture TAP setup errors earlier, refer to newer version of water which should fix #456 2019-07-19 22:21:30 +01:00
Neil Alexander
06330f503f
Recover if stillAlive fails 2019-07-18 00:02:16 +01:00
Neil Alexander
311c612f2e
Only flag stillAlive on successful write 2019-07-17 23:23:19 +01:00
Neil Alexander
307b24d8cb
Fix Conn.Read/Conn.Write behavior after Conn.Close, get rid of second TUN/TAP conn reader goroutine, no longer use deadlines 2019-07-17 21:42:17 +01:00
Neil Alexander
1bf1c6eb36
Revert "Remove stillAlive code from TUN/TAP conn as it is no longer required with the new deadlines"
This reverts commit eec70bf2f2.
2019-07-17 19:43:29 +01:00
Neil Alexander
eec70bf2f2
Remove stillAlive code from TUN/TAP conn as it is no longer required with the new deadlines 2019-07-17 13:53:16 +01:00