From 38dc2ab3476802c141c029ce26706af1c484db07 Mon Sep 17 00:00:00 2001 From: Nate Brown Date: Wed, 11 Dec 2019 12:02:57 -0800 Subject: [PATCH] Same story for txqueuelen --- tun_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tun_linux.go b/tun_linux.go index ed4585c..1099f5e 100644 --- a/tun_linux.go +++ b/tun_linux.go @@ -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) }