Blame 0009-arptables-remove-dead-dynamic-hooks-code.patch

d8a888d
From 27791d35cf3fd7e7ca1389804b6e1820fa70bc0f Mon Sep 17 00:00:00 2001
d8a888d
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
d8a888d
Date: Tue, 11 Nov 2014 10:20:22 -0300
d8a888d
Subject: [PATCH] arptables: remove dead dynamic hooks code
d8a888d
d8a888d
The code is unused and #if'ed away, it also breaks pure-static
d8a888d
builds because of the dlfcn.h include.
d8a888d
d8a888d
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
d8a888d
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
d8a888d
(cherry picked from commit 4b7d6b0cac33d41cb3c74694ada06e19aa7e920e)
d8a888d
Signed-off-by: Phil Sutter <psutter@redhat.com>
d8a888d
---
d8a888d
 arptables.c              |  1 -
d8a888d
 libarptc/libarptc_incl.c | 15 ---------------
d8a888d
 2 files changed, 16 deletions(-)
d8a888d
d8a888d
diff --git a/arptables.c b/arptables.c
d8a888d
index 64ac3aa226a2c..845e226a98a30 100644
d8a888d
--- a/arptables.c
d8a888d
+++ b/arptables.c
d8a888d
@@ -35,7 +35,6 @@
d8a888d
 #include <stdio.h>
d8a888d
 #include <stdlib.h>
d8a888d
 #include <inttypes.h>
d8a888d
-#include <dlfcn.h>
d8a888d
 #include <ctype.h>
d8a888d
 #include <stdarg.h>
d8a888d
 #include <limits.h>
d8a888d
diff --git a/libarptc/libarptc_incl.c b/libarptc/libarptc_incl.c
d8a888d
index 9c1aeac7ca3de..1d2e8b7b7ac01 100644
d8a888d
--- a/libarptc/libarptc_incl.c
d8a888d
+++ b/libarptc/libarptc_incl.c
d8a888d
@@ -257,22 +257,7 @@ TC_INIT(const char *tablename)
d8a888d
 	    == NULL)
d8a888d
 		return NULL;
d8a888d
 
d8a888d
-/* Too hard --RR */
d8a888d
-#if 0
d8a888d
-	sprintf(pathname, "%s/%s", ARPT_LIB_DIR, info.name);
d8a888d
-	dynlib = dlopen(pathname, RTLD_NOW);
d8a888d
-	if (!dynlib) {
d8a888d
-		errno = ENOENT;
d8a888d
-		return NULL;
d8a888d
-	}
d8a888d
-	h->hooknames = dlsym(dynlib, "hooknames");
d8a888d
-	if (!h->hooknames) {
d8a888d
-		errno = ENOENT;
d8a888d
-		return NULL;
d8a888d
-	}
d8a888d
-#else
d8a888d
 	h->hooknames = hooknames;
d8a888d
-#endif
d8a888d
 
d8a888d
 	/* Initialize current state */
d8a888d
 	h->info = info;
d8a888d
-- 
d8a888d
2.21.0
d8a888d