4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-06-16 10:06:05 +00:00

Fix adapter setup and no longer panics on packets shorter than IP header

This commit is contained in:
Neil Alexander
2019-03-28 09:12:00 +00:00
parent 0b494a8255
commit 0715e829c2
3 changed files with 18 additions and 7 deletions

View File

@ -29,7 +29,8 @@ type adapterImplementation interface {
}
// Initialises the adapter.
func (adapter Adapter) Init(config *config.NodeState, log *log.Logger, send chan<- []byte, recv <-chan []byte) {
func (adapter *Adapter) Init(config *config.NodeState, log *log.Logger, send chan<- []byte, recv <-chan []byte) {
log.Traceln("Adapter setup - given channels:", send, recv)
adapter.Send = send
adapter.Recv = recv
adapter.Reconfigure = make(chan chan error, 1)