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/unix: Missing Netfilter and NFTables constants #64426

Closed
LionelJouin opened this issue Nov 28, 2023 · 2 comments
Closed

x/sys/unix: Missing Netfilter and NFTables constants #64426

LionelJouin opened this issue Nov 28, 2023 · 2 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FeatureRequest FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@LionelJouin
Copy link

Go version

go version go1.21.1 linux/amd64

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

GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/lionelj/.cache/go-build'
GOENV='/home/lionelj/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/lionelj/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/lionelj/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.1'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1866483795=/tmp/go-build -gno-record-gcc-switches'

What did you do?

Try to use the NFtables constants (e.g. unix.NFT_QUEUE_FLAG_BYPASS) and the Netfilter constants (e.g. unix.NF_NAT_RANGE_PROTO_RANDOM).

These constants are used with netfilter:

What did you expect to see?

Being able to use constants from linux/netfilter/nf_tables.h and from linux/netfilter/nf_nat.h. This would add 54 constants with NF_NAT_ and NFT_ excluding NFT_META_IIFTYPE since it is already imported from nf_tables.h#951.

What did you see instead?

Compiler error: undefined: unix.NFT_QUEUE_FLAG_BYPASS

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Nov 28, 2023
@gopherbot gopherbot added this to the Unreleased milestone Nov 28, 2023
LionelJouin added a commit to LionelJouin/golang-sys that referenced this issue Nov 28, 2023
@LionelJouin LionelJouin reopened this Nov 28, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/545495 mentions this issue: unix: Add Netfilter and NFTables constants

@dmitshur
Copy link
Contributor

CC @tklauser, @golang/runtime.

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. FixPending Issues that have a fix which has not yet been reviewed or submitted. FeatureRequest labels Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FeatureRequest FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants