]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/cgroup: ignore NFT sets for other sources
authorTopi Miettinen <toiwoton@gmail.com>
Wed, 25 Oct 2023 18:32:35 +0000 (21:32 +0300)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 26 Oct 2023 07:24:14 +0000 (08:24 +0100)
Partially fixes: #29678

src/core/cgroup.c

index 2199b94d245e963a4fdb0a935221a57e1c69a373..15dfc56fb77482bf0eb67dfa26336116aa736859 100644 (file)
@@ -1500,6 +1500,9 @@ void unit_modify_nft_set(Unit *u, bool add) {
         CGroupContext *c = ASSERT_PTR(unit_get_cgroup_context(u));
 
         FOREACH_ARRAY(nft_set, c->nft_set_context.sets, c->nft_set_context.n_sets) {
+                if (nft_set->source != NFT_SET_SOURCE_CGROUP)
+                        continue;
+
                 uint64_t element = u->cgroup_id;
 
                 r = nft_set_element_modify_any(u->manager->fw_ctx, add, nft_set->nfproto, nft_set->table, nft_set->set, &element, sizeof(element));