Merge pull request #121 from slackhq/txq-err

Make linux tx queue length an error log instead of a fatal on error
This commit is contained in:
Nathan Brown 2019-12-20 09:21:46 -08:00 committed by GitHub
commit fe8a71ed59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -194,7 +194,8 @@ func (c Tun) Activate() error {
// Set the transmit queue length
ifrq := ifreqQLEN{Name: devName, Value: int32(c.TXQueueLen)}
if err = ioctl(fd, unix.SIOCSIFTXQLEN, uintptr(unsafe.Pointer(&ifrq))); err != nil {
return fmt.Errorf("failed to set tun tx queue length: %s", err)
// If we can't set the queue length nebula will still work but it may lead to packet loss
l.WithError(err).Error("Failed to set tun tx queue length")
}
// Bring up the interface