Blame SOURCES/1001-core-increase-limit-of-open-file-descriptors-for-Net.patch

a46738
From a5eb2f55d79b9023fbda6945da09f9bcecea8560 Mon Sep 17 00:00:00 2001
a46738
From: Thomas Haller <thaller@redhat.com>
a46738
Date: Sun, 28 Feb 2021 11:18:16 +0100
a46738
Subject: [PATCH 1/1] core: increase limit of open file descriptors for
a46738
 NetworkManager.service
a46738
a46738
Note that POSIX select() can only handle up to 1024 descriptors. That
a46738
means, our code (and the libraries that we use) must not use select().
a46738
a46738
Note that libndp uses select(), which means NetworkManager will crash
a46738
when using file descriptors larger than 1023. On the other hand,
a46738
depriving NetworkManager of file descriptors will also crash it.
a46738
So libndp must be fixed ([1]).
a46738
a46738
[1] https://listman.redhat.com/archives/libndp-list/2021-February/msg00000.html
a46738
a46738
https://bugzilla.redhat.com/show_bug.cgi?id=1926599
a46738
(cherry picked from commit a708a172a6a289d5399897e7da3a0e38721b1b7e)
a46738
(cherry picked from commit 2ca405fa9bd047593cd299691b74af7f44184c71)
a46738
---
a46738
 data/NetworkManager.service.in | 4 ++++
a46738
 1 file changed, 4 insertions(+)
a46738
a46738
diff --git a/data/NetworkManager.service.in b/data/NetworkManager.service.in
a46738
index 91ebd9a36e65..9cf1c3d28f47 100644
a46738
--- a/data/NetworkManager.service.in
a46738
+++ b/data/NetworkManager.service.in
a46738
@@ -19,6 +19,10 @@ CapabilityBoundingSet=CAP_NET_ADMIN CAP_DAC_OVERRIDE CAP_NET_RAW CAP_NET_BIND_SE
a46738
 ProtectSystem=true
a46738
 ProtectHome=read-only
a46738
 
a46738
+# We require file descriptors for DHCP etc. When activating many interfaces,
a46738
+# the default limit of 1024 is easily reached.
a46738
+LimitNOFILE=65536
a46738
+
a46738
 [Install]
a46738
 WantedBy=multi-user.target
a46738
 Also=NetworkManager-dispatcher.service
a46738
-- 
a46738
2.29.2
a46738