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 path option for cgroup #1192

Open
rodehoed opened this issue Feb 28, 2024 · 0 comments
Open

Add path option for cgroup #1192

rodehoed opened this issue Feb 28, 2024 · 0 comments

Comments

@rodehoed
Copy link

Use Case

Using a cgroup path is much easier to maintain and understand then the net_cls cgroup ID

Describe the Solution You Would Like

When using the the cgroup option also support a path. Right now this done this way: -m cgroup --cgroup , but the path option would like this: -m cgroup --path 'system.slice/example.service' .

Describe Alternatives You've Considered

Well using the ID can be hard to find

Additional Context

I think for backward compatibility; you could make the parameter for cgroup like this:

  • if VALUE is numeric, then presume an net_cls cgroup ID and use --cgroup
  • if VALUE is a string (and maybe look for '/') use --path

converted to iptables it would look like:

iptables -A OUTPUT -p tcp --sport xxxxx -m cgroup --path system.slice/example_jump.service  -j ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants