diff options
Diffstat (limited to 'src/device.go')
-rw-r--r-- | src/device.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/device.go b/src/device.go index 9422d49..429ee46 100644 --- a/src/device.go +++ b/src/device.go @@ -126,13 +126,13 @@ func (device *Device) PutMessageBuffer(msg *[MaxMessageSize]byte) { device.pool.messageBuffers.Put(msg) } -func NewDevice(tun TUNDevice, logLevel int) *Device { +func NewDevice(tun TUNDevice, logger *Logger) *Device { device := new(Device) device.mutex.Lock() defer device.mutex.Unlock() - device.log = NewLogger(logLevel, "("+tun.Name()+") ") + device.log = logger device.peers = make(map[NoisePublicKey]*Peer) device.tun.device = tun |