mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
Fix adapter setup and no longer panics on packets shorter than IP header
This commit is contained in:
parent
0b494a8255
commit
0715e829c2
3 changed files with 18 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue