aboutsummaryrefslogtreecommitdiffstats
path: root/device/tun.go
diff options
context:
space:
mode:
Diffstat (limited to 'device/tun.go')
-rw-r--r--device/tun.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/device/tun.go b/device/tun.go
index fe1158c..0a3fc79 100644
--- a/device/tun.go
+++ b/device/tun.go
@@ -23,7 +23,7 @@ func (device *Device) RoutineTUNEventReader() {
device.state.starting.Done()
for event := range device.tun.device.Events() {
- if event&tun.TUNEventMTUUpdate != 0 {
+ if event&tun.EventMTUUpdate != 0 {
mtu, err := device.tun.device.MTU()
old := atomic.LoadInt32(&device.tun.mtu)
if err != nil {
@@ -38,13 +38,13 @@ func (device *Device) RoutineTUNEventReader() {
}
}
- if event&tun.TUNEventUp != 0 && !setUp {
+ if event&tun.EventUp != 0 && !setUp {
logInfo.Println("Interface set up")
setUp = true
device.Up()
}
- if event&tun.TUNEventDown != 0 && setUp {
+ if event&tun.EventDown != 0 && setUp {
logInfo.Println("Interface set down")
setUp = false
device.Down()