We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b43e213 commit bde65aaCopy full SHA for bde65aa
src/tun/iface.go
@@ -41,7 +41,9 @@ func (tun *TunAdapter) queue() {
41
tun.log.Errorln("Exiting TUN writer due to core read error:", err)
42
return
43
}
44
- tun.ch <- p[:n]
+ if tun.ch != nil {
45
+ tun.ch <- p[:n]
46
+ }
47
48
49
src/tun/tun.go
@@ -125,8 +125,9 @@ func (tun *TunAdapter) _start() error {
125
if tun.config.name == "none" || tun.config.name == "dummy" {
126
tun.log.Debugln("Not starting TUN as ifname is none or dummy")
127
tun.isEnabled = false
128
+ // Need to keep the queue goroutine running to stop underlying
129
+ // layers from getting blocked.
130
go tun.queue()
- go tun.write()
131
return nil
132
133
mtu := uint64(tun.config.mtu)
0 commit comments