Re: [go-nuts] can't read data from the tun device

2023-06-16 Thread Ian Lance Taylor
On Thu, Jun 15, 2023 at 10:41 PM akalio ja wrote: > > GOVERSION="go1.20.3" Thanks. You didn't say what the exact problem was, but I would guess that you are running into the problem described at https://go.dev/issue/59545. That problem should be fixed in the upcoming 1.21 release. Ian > 在202

Re: [go-nuts] can't read data from the tun device

2023-06-15 Thread akalio ja
GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/root/.cache/go-build" GOENV="/root/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/root/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/root/go" GOPRIVATE="" GOPROXY="http

Re: [go-nuts] can't read data from the tun device

2023-06-15 Thread Ian Lance Taylor
What version of Go are you using? Ian On Thu, Jun 15, 2023, 5:32 AM akalio ja wrote: > func openTun(ch chan int, timer *time.Timer) { > > fd, err := unix.Open("/dev/net/tun", unix.O_RDWR|unix.O_NONBLOCK, 0) > if err != nil { > panic(err) > } > defer unix.Close(fd) > >

[go-nuts] can't read data from the tun device

2023-06-15 Thread akalio ja
func openTun(ch chan int, timer *time.Timer) { fd, err := unix.Open("/dev/net/tun", unix.O_RDWR|unix.O_NONBLOCK, 0) if err != nil { panic(err) } defer unix.Close(fd) var ifr struct { name [16]byte flags uint16 _ [22]byte } copy(ifr.