Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/sys: Add nftables compat defines and types to unix package #40898

Closed
rikatz opened this issue Aug 19, 2020 · 1 comment
Closed

x/sys: Add nftables compat defines and types to unix package #40898

rikatz opened this issue Aug 19, 2020 · 1 comment

Comments

@rikatz
Copy link

rikatz commented Aug 19, 2020

What version of Go are you using (go version)?

$ go version
go version go1.15 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/rkatz/.cache/go-build"
GOENV="/home/rkatz/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/rkatz/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/rkatz/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/rkatz/go/1.15"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/rkatz/go/1.15/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/rkatz/git/nftables/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build168263282=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I'm writing some code to be used with nftables (netlink), and found that not every nftables type is mapped in https://github.com/golang/sys/blob/release-branch.go1.15/unix/linux/types.go.

Mainly it suggests to add the /usr/include/linux/netfilter/nf_tables.h but not the /usr/include/linux/netfilter/nf_tables_compat.h

What did you expect to see?

const identifications of other nftables syscall attributes (like NFTA_MATCH_NAME) also living in x/sys/unix package

What did you see instead?

No NFTA_MATCH_* (and others) exists in the unix package.

Thank you!

@gopherbot gopherbot added this to the Unreleased milestone Aug 19, 2020
rikatz pushed a commit to rikatz/sys that referenced this issue Aug 19, 2020
Some types from nftables compatibility header are missing
in unix package and this change adds those missing types

Fixes golang/go#40898

Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@serpro.gov.br>
@gopherbot
Copy link

Change https://golang.org/cl/249237 mentions this issue: unix: add nftables_compat defines and types

rikatz pushed a commit to rikatz/sys that referenced this issue Aug 19, 2020
    Some types from nftables compatibility header are missing
    in unix package and this change adds those missing types

    Fixes golang/go#40898
@golang golang locked and limited conversation to collaborators Aug 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants