summaryrefslogtreecommitdiff
path: root/net-misc/oidentd/files/oidentd-2.0.8-no-conntrack-masquerading.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/oidentd/files/oidentd-2.0.8-no-conntrack-masquerading.patch
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/oidentd/files/oidentd-2.0.8-no-conntrack-masquerading.patch')
-rw-r--r--net-misc/oidentd/files/oidentd-2.0.8-no-conntrack-masquerading.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/net-misc/oidentd/files/oidentd-2.0.8-no-conntrack-masquerading.patch b/net-misc/oidentd/files/oidentd-2.0.8-no-conntrack-masquerading.patch
new file mode 100644
index 000000000000..92ef02523160
--- /dev/null
+++ b/net-misc/oidentd/files/oidentd-2.0.8-no-conntrack-masquerading.patch
@@ -0,0 +1,41 @@
+From 20a63ad8a90c36397cceedd34887298890dbafa3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Fri, 11 Mar 2016 10:38:10 +0100
+Subject: [PATCH] Linux: Do not open conntracking table if masquerading is not
+ enabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The contracking table was always opened. This is unnecessary because
+the table is used only when masquerading feature is requested on run
+time.
+
+This patch skips opening the conntracking table on Linux if
+masquerading is not requested.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1316308
+Signed-off-by: Petr Písař <ppisar@redhat.com>
+---
+ src/kernel/linux.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/kernel/linux.c b/src/kernel/linux.c
+index 9103dbf..859f554 100644
+--- a/src/kernel/linux.c
++++ b/src/kernel/linux.c
+@@ -70,6 +70,11 @@ bool netfilter;
+ */
+ bool core_init(void) {
+ #ifdef MASQ_SUPPORT
++ if (!opt_enabled(MASQ)) {
++ masq_fp = NULL;
++ return true;
++ }
++
+ masq_fp = fopen(MASQFILE, "r");
+ if (masq_fp == NULL) {
+ if (errno != ENOENT) {
+--
+2.5.0
+