Same story for txqueuelen
This commit is contained in:
parent
4bbf6dc29c
commit
38dc2ab347
|
@ -71,7 +71,7 @@ type ifreqMTU struct {
|
||||||
|
|
||||||
type ifreqQLEN struct {
|
type ifreqQLEN struct {
|
||||||
Name [16]byte
|
Name [16]byte
|
||||||
Value int
|
Value int32
|
||||||
pad [8]byte
|
pad [8]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ func (c Tun) Activate() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the transmit queue length
|
// 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 {
|
if err = ioctl(fd, syscall.SIOCSIFTXQLEN, uintptr(unsafe.Pointer(&ifrq))); err != nil {
|
||||||
return fmt.Errorf("failed to set tun tx queue length: %s", err)
|
return fmt.Errorf("failed to set tun tx queue length: %s", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue