Skip to contentSkip to conversation

netfilter: x_tables: allow to use default cgroup match

PATCH Applied Daniel Borkmann 3 participants 3 messages Aug 18, 2014 – Aug 19, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter: x_tables: allow to use default cgroup match

There's actually no good reason why we cannot use cgroup id 0, so lets just remove this artificial barrier.

---
 net/netfilter/xt_cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/xt_cgroup.c +1 -1
index f4e8330..7198d66 100644
@@ -31,7 +31,7 @@ static int cgroup_mt_check(const struct xt_mtchk_param *par)
 	if (info->invert & ~1)
 		return -EINVAL;
 
-	return info->id ? 0 : -EINVAL;
+	return 0;
 }
 
 static bool
Signature · 1 line
1.7.11.7
Tested-by on v1 1/1
#1 lore raw
Quoted 10 lines · Daniel Borkmann

There's actually no good reason why we cannot use cgroup id 0, so lets just remove this artificial barrier.

---
  net/netfilter/xt_cgroup.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Thank you, Daniel, I tested it on my environment, patch is fine.

Signature · 2 lines
Best regards,
Alexey Perevalov
maintainer Applied
#2 lore raw
Quoted 11 lines · Alexey Perevalov
Quoted 10 lines · Daniel Borkmann

There's actually no good reason why we cannot use cgroup id 0, so lets just remove this artificial barrier.

---
 net/netfilter/xt_cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 3 lines

Thank you, Daniel, I tested it on my environment, patch is fine.

Applied, thanks.