From: Daniel Mack Date: Fri, 11 Nov 2016 18:59:19 +0000 (+0100) Subject: cgroup: add fields to accommodate eBPF related details X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=58505eca4f5a861e4779e57878f7974a935da8d2;p=elogind.git cgroup: add fields to accommodate eBPF related details Add pointers for compiled eBPF programs as well as list heads for allowed and denied hosts for both directions. --- diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 1289ddf73..17d3eb2e5 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -142,6 +142,9 @@ void cgroup_context_done(CGroupContext *c) { while (c->device_allow) cgroup_context_free_device_allow(c, c->device_allow); + + c->ip_address_allow = ip_address_access_free_all(c->ip_address_allow); + c->ip_address_deny = ip_address_access_free_all(c->ip_address_deny); } void cgroup_context_dump(CGroupContext *c, FILE* f, const char *prefix) { diff --git a/src/core/cgroup.h b/src/core/cgroup.h index dd8e436b9..11705be00 100644 --- a/src/core/cgroup.h +++ b/src/core/cgroup.h @@ -88,6 +88,7 @@ struct CGroupContext { bool blockio_accounting; bool memory_accounting; bool tasks_accounting; + bool ip_accounting; /* For unified hierarchy */ uint64_t cpu_weight; @@ -104,6 +105,9 @@ struct CGroupContext { uint64_t memory_max; uint64_t memory_swap_max; + LIST_HEAD(IPAddressAccessItem, ip_address_allow); + LIST_HEAD(IPAddressAccessItem, ip_address_deny); + /* For legacy hierarchies */ uint64_t cpu_shares; uint64_t startup_cpu_shares;