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

Question: Check if nf_tables is initialized #37

Closed
sbezverk opened this issue Jul 18, 2019 · 1 comment
Closed

Question: Check if nf_tables is initialized #37

sbezverk opened this issue Jul 18, 2019 · 1 comment

Comments

@sbezverk
Copy link
Contributor

What would you suggest to use to check if nf_tables module is loaded from the go code. I mean other that executing external lsmod and grep for nf_tables?
Appreciate your thought about it.

@sbezverk sbezverk changed the title Question: Check if netfilter is initialized Question: Check if nf_tables is initialized Jul 18, 2019
@stapelberg
Copy link
Collaborator

AFAIR, if you open the netlink socket (e.g. via the nftables library), you’ll get something like ENOSYS error code if nftables is not available in the kernel. Have you looked at that? I think that’ll be much more robust than relying on external programs.

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

No branches or pull requests

2 participants