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

Add support for CGROUP_ID to inet_diag_message and fix type for CLASS_ID #1092

Merged
merged 1 commit into from
May 10, 2023
Merged

Add support for CGROUP_ID to inet_diag_message and fix type for CLASS_ID #1092

merged 1 commit into from
May 10, 2023

Conversation

PaulFurtado
Copy link
Contributor

I currently use inet_diag_msg to look up the class id of sockets from the application's net_cls cgroup and I've been decoding the hex string, but always meant to make a PR to fix it to be uint32. I'm now upgrading the system to cgroup v2, so I need to move to cgroup id instead which required adding additional fields.

You can see where these are set upstream in the kernel here: https://github.com/torvalds/linux/blob/ac9a78681b921877518763ba0e89202254349d1b/net/ipv4/inet_diag.c#L170-L177
These fields are populated when you request the TCLASS extension.

@svinota svinota merged commit c24f5c4 into svinota:master May 10, 2023
@svinota
Copy link
Owner

svinota commented May 10, 2023

Thanks!

@PaulFurtado PaulFurtado deleted the inet_diag_cgroup branch May 16, 2023 19:20
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.

2 participants