1. added ckr init code

This commit is contained in:
vadym 2021-07-10 18:54:31 +03:00
parent bd6538819d
commit 8395fbe6fe

View file

@ -37,6 +37,7 @@ type TunAdapter struct {
log *log.Logger
addr address.Address
subnet address.Subnet
ckr cryptokey
mtu uint64
iface tun.Device
phony.Inbox // Currently only used for _handlePacket from the reader, TODO: all the stuff that currently needs a mutex below
@ -141,6 +142,7 @@ func (tun *TunAdapter) _start() error {
}
tun.core.SetMTU(tun.MTU())
tun.isOpen = true
tun.ckr.init(tun)
tun.isEnabled = true
go tun.read()
go tun.write()