diff options
Diffstat (limited to 'device/tun.go')
-rw-r--r-- | device/tun.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/device/tun.go b/device/tun.go index 97f1276..ae5cae1 100644 --- a/device/tun.go +++ b/device/tun.go @@ -15,37 +15,37 @@ const DefaultMTU = 1420 func (device *Device) RoutineTUNEventReader() { setUp := false - device.debugf("Routine: event worker - started") + device.log.Verbosef("Routine: event worker - started") for event := range device.tun.device.Events() { if event&tun.EventMTUUpdate != 0 { mtu, err := device.tun.device.MTU() old := atomic.LoadInt32(&device.tun.mtu) if err != nil { - device.errorf("Failed to load updated MTU of device: %v", err) + device.log.Errorf("Failed to load updated MTU of device: %v", err) } else if int(old) != mtu { if mtu+MessageTransportSize > MaxMessageSize { - device.infof("MTU updated: %v (too large)", mtu) + device.log.Verbosef("MTU updated: %v (too large)", mtu) } else { - device.infof("MTU updated: %v", mtu) + device.log.Verbosef("MTU updated: %v", mtu) } atomic.StoreInt32(&device.tun.mtu, int32(mtu)) } } if event&tun.EventUp != 0 && !setUp { - device.infof("Interface set up") + device.log.Verbosef("Interface set up") setUp = true device.Up() } if event&tun.EventDown != 0 && setUp { - device.infof("Interface set down") + device.log.Verbosef("Interface set down") setUp = false device.Down() } } - device.debugf("Routine: event worker - stopped") + device.log.Verbosef("Routine: event worker - stopped") device.state.stopping.Done() } |