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

ipset: support creation of inet6 sets #703

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stv0g
Copy link
Contributor

@stv0g stv0g commented Oct 14, 2021

This PR adds support for AF_INET6 address and network management in the ipset code.

ipset_linux.go Outdated Show resolved Hide resolved
@vishvananda
Copy link
Owner

there are multiple mistakes in fallthrough in this pr. Please fix and ammedn the commit. Thanks!

@stv0g
Copy link
Contributor Author

stv0g commented Dec 20, 2021

Hi @vishvananda,

sorry, the fallthroughs are fixed now.

@vishvananda vishvananda changed the base branch from master to main January 12, 2022 22:30
@vishvananda vishvananda reopened this Jan 12, 2022
@vishvananda
Copy link
Owner

Looks like the tests are failing in CI. Does it need a newer kernel version? or a certain kernel module?

@noblehng
Copy link

noblehng commented Jan 22, 2022

I need this and tested it. It is very strange that just adding any constant in nl/ipset_linux.go will fail the exact same test without any other change. The test is just testing parsing of a fixture.

Edit:
What is more funny is that if I move the added constants to its own group, the test passed. Something like:

const (
        IPSET_ATTR_IPV4 = 1 
        IPSET_ATTR_IPV6 = 2 
)

One more thing, the constants should be named by IPSET_ATTR_IPADDR_IPV4 and IPSET_ATTR_IPADDR_IPV6 to match linux header.

Edit2:
Oh, it was because the following iota got shift by two:

IPSET_ATTR_GC = 3 + iota

@aboch
Copy link
Collaborator

aboch commented Mar 28, 2024

@stv0g

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants