Same story for txqueuelen

This commit is contained in:
Nate Brown 2019-12-11 12:02:57 -08:00
parent 4bbf6dc29c
commit 38dc2ab347
1 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ type ifreqMTU struct {
type ifreqQLEN struct {
Name [16]byte
Value int
Value int32
pad [8]byte
}
@ -190,7 +190,7 @@ func (c Tun) Activate() error {
}
// Set the transmit queue length
ifrq := ifreqQLEN{Name: devName, Value: c.TXQueueLen}
ifrq := ifreqQLEN{Name: devName, Value: int32(c.TXQueueLen)}
if err = ioctl(fd, syscall.SIOCSIFTXQLEN, uintptr(unsafe.Pointer(&ifrq))); err != nil {
return fmt.Errorf("failed to set tun tx queue length: %s", err)
}