summaryrefslogtreecommitdiffhomepage
path: root/device/tun.go
diff options
context:
space:
mode:
authorMatt Layher <mdlayher@gmail.com>2019-06-10 17:33:40 -0400
committerJason A. Donenfeld <Jason@zx2c4.com>2019-06-14 18:35:57 +0200
commit1f48971a80f48257e478e532f6971d0557026120 (patch)
treecd2a3b83a1b3d5e09d5e8283c61d29537f0cbf3e /device/tun.go
parent3371f8dac6fe6bbd7522a8316b50f6473012e302 (diff)
tun: remove TUN prefix from types to reduce stutter elsewhere
Signed-off-by: Matt Layher <mdlayher@gmail.com>
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()