chiark / gitweb /
cgroup: add fields to accommodate eBPF related details
authorDaniel Mack <daniel@zonque.org>
Fri, 11 Nov 2016 18:59:19 +0000 (19:59 +0100)
committerSven Eden <yamakuzure@gmx.net>
Tue, 21 Nov 2017 06:02:44 +0000 (07:02 +0100)
Add pointers for compiled eBPF programs as well as list heads for allowed
and denied hosts for both directions.

src/core/cgroup.c
src/core/cgroup.h

index 1289ddf7374a45b82edf511bc1eeaf81f6f1e392..17d3eb2e5235f0d26a3e0789602d4bbc5ebedbe5 100644 (file)
@@ -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) {
index dd8e436b969f45b91561893f702daa3ccd039f88..11705be00d64f1a018d641b23a2583b24ebaeff7 100644 (file)
@@ -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;