Fix osx for mq changes, this does not implement mq on osx (#395)

This commit is contained in:
Nathan Brown 2021-03-01 15:57:05 -06:00 committed by GitHub
parent 1bae5b2550
commit ecfb40f29c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -130,7 +130,7 @@ func (f *Interface) run() {
go f.listenOut(i)
}
// Launch n queues to read packets from tun dev
// Prepare n tun queues
var reader io.ReadWriteCloser = f.inside
for i := 0; i < f.routines; i++ {
if i > 0 {
@ -140,12 +140,16 @@ func (f *Interface) run() {
}
}
f.readers[i] = reader
go f.listenIn(reader, i)
}
if err := f.inside.Activate(); err != nil {
l.Fatal(err)
}
// Launch n queues to read packets from tun dev
for i := 0; i < f.routines; i++ {
go f.listenIn(f.readers[i], i)
}
}
func (f *Interface) listenOut(i int) {