teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame 0140-kmod-setup-load-ip_tables-kmod-at-boot.patch

Zbigniew Jędrzejewski-Szmek ef7b48
From 08a2ba2c6981ec9fef16639d1bed16a40406f0d0 Mon Sep 17 00:00:00 2001
Zbigniew Jędrzejewski-Szmek ef7b48
From: Lennart Poettering <lennart@poettering.net>
Zbigniew Jędrzejewski-Szmek ef7b48
Date: Wed, 22 Apr 2015 13:50:56 +0200
Zbigniew Jędrzejewski-Szmek ef7b48
Subject: [PATCH] kmod-setup: load ip_tables kmod at boot
Zbigniew Jędrzejewski-Szmek ef7b48
Zbigniew Jędrzejewski-Szmek ef7b48
The module is currently no auto-loadable (and this is unlikely to change
Zbigniew Jędrzejewski-Szmek ef7b48
anytime soon, given it's API is via getsockopt/setsockopt). It is needed
Zbigniew Jędrzejewski-Szmek ef7b48
by networkd and nspawn currently.
Zbigniew Jędrzejewski-Szmek ef7b48
Zbigniew Jędrzejewski-Szmek ef7b48
Users who really don't like the module to be loaded have the option to
Zbigniew Jędrzejewski-Szmek ef7b48
blacklist it still, or not compile it at all. But for all others this
Zbigniew Jędrzejewski-Szmek ef7b48
should make things work out-of-the-box.
Zbigniew Jędrzejewski-Szmek ef7b48
Zbigniew Jędrzejewski-Szmek ef7b48
(cherry picked from commit 1d3087978a8ee23107cb64aa55ca97aefe9531e2)
Zbigniew Jędrzejewski-Szmek ef7b48
---
Zbigniew Jędrzejewski-Szmek ef7b48
 src/core/kmod-setup.c | 11 +++++++----
Zbigniew Jędrzejewski-Szmek ef7b48
 1 file changed, 7 insertions(+), 4 deletions(-)
Zbigniew Jędrzejewski-Szmek ef7b48
Zbigniew Jędrzejewski-Szmek ef7b48
diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
Zbigniew Jędrzejewski-Szmek ef7b48
index c0a05b97aa..97f3b9b34a 100644
Zbigniew Jędrzejewski-Szmek ef7b48
--- a/src/core/kmod-setup.c
Zbigniew Jędrzejewski-Szmek ef7b48
+++ b/src/core/kmod-setup.c
Zbigniew Jędrzejewski-Szmek ef7b48
@@ -63,16 +63,19 @@ int kmod_setup(void) {
Zbigniew Jędrzejewski-Szmek ef7b48
                 bool (*condition_fn)(void);
Zbigniew Jędrzejewski-Szmek ef7b48
         } kmod_table[] = {
Zbigniew Jędrzejewski-Szmek ef7b48
                 /* auto-loading on use doesn't work before udev is up */
Zbigniew Jędrzejewski-Szmek ef7b48
-                { "autofs4", "/sys/class/misc/autofs", true, NULL                 },
Zbigniew Jędrzejewski-Szmek ef7b48
+                { "autofs4",   "/sys/class/misc/autofs",    true,  NULL                },
Zbigniew Jędrzejewski-Szmek ef7b48
 
Zbigniew Jędrzejewski-Szmek ef7b48
                 /* early configure of ::1 on the loopback device */
Zbigniew Jędrzejewski-Szmek ef7b48
-                { "ipv6",    "/sys/module/ipv6",       true, NULL                 },
Zbigniew Jędrzejewski-Szmek ef7b48
+                { "ipv6",      "/sys/module/ipv6",          true,  NULL                },
Zbigniew Jędrzejewski-Szmek ef7b48
 
Zbigniew Jędrzejewski-Szmek ef7b48
                 /* this should never be a module */
Zbigniew Jędrzejewski-Szmek ef7b48
-                { "unix",    "/proc/net/unix",         true, NULL                 },
Zbigniew Jędrzejewski-Szmek ef7b48
+                { "unix",      "/proc/net/unix",            true,  NULL                },
Zbigniew Jędrzejewski-Szmek ef7b48
 
Zbigniew Jędrzejewski-Szmek ef7b48
                 /* IPC is needed before we bring up any other services */
Zbigniew Jędrzejewski-Szmek ef7b48
-                { "kdbus",   "/sys/fs/kdbus",          false, cmdline_check_kdbus },
Zbigniew Jędrzejewski-Szmek ef7b48
+                { "kdbus",     "/sys/fs/kdbus",             false, cmdline_check_kdbus },
Zbigniew Jędrzejewski-Szmek ef7b48
+
Zbigniew Jędrzejewski-Szmek ef7b48
+                /* netfilter is needed by networkd, nspawn among others, and cannot be autoloaded */
Zbigniew Jędrzejewski-Szmek ef7b48
+                { "ip_tables", "/proc/net/ip_tables_names", false, NULL                },
Zbigniew Jędrzejewski-Szmek ef7b48
         };
Zbigniew Jędrzejewski-Szmek ef7b48
         struct kmod_ctx *ctx = NULL;
Zbigniew Jędrzejewski-Szmek ef7b48
         unsigned int i;