diff mbox series

[iptables] ebtables-compat: load mark target

Message ID 20180410105338.17153-1-fw@strlen.de
State Accepted
Delegated to: Pablo Neira
Headers show
Series [iptables] ebtables-compat: load mark target | expand

Commit Message

Florian Westphal April 10, 2018, 10:53 a.m. UTC
Its already there but it did not work because it wasn't loaded.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 iptables/xtables-eb.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

Comments

Pablo Neira Ayuso April 11, 2018, 8 a.m. UTC | #1
On Tue, Apr 10, 2018 at 12:53:38PM +0200, Florian Westphal wrote:
> Its already there but it did not work because it wasn't loaded.
> 
> Signed-off-by: Florian Westphal <fw@strlen.de>

Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c
index 33f7851e9e5a..596894fdc000 100644
--- a/iptables/xtables-eb.c
+++ b/iptables/xtables-eb.c
@@ -623,14 +623,14 @@  static void ebt_load_match(const char *name)
 		xtables_error(OTHER_PROBLEM, "Can't alloc memory");
 }
 
-static void ebt_load_watcher(const char *name)
+static void __ebt_load_watcher(const char *name, const char *typename)
 {
 	struct xtables_target *watcher;
 	size_t size;
 
 	watcher = xtables_find_target(name, XTF_TRY_LOAD);
 	if (!watcher) {
-		fprintf(stderr, "Unable to load %s watcher\n", name);
+		fprintf(stderr, "Unable to load %s %s\n", name, typename);
 		return;
 	}
 
@@ -651,6 +651,16 @@  static void ebt_load_watcher(const char *name)
 		xtables_error(OTHER_PROBLEM, "Can't alloc memory");
 }
 
+static void ebt_load_watcher(const char *name)
+{
+	return __ebt_load_watcher(name, "watcher");
+}
+
+static void ebt_load_target(const char *name)
+{
+	return __ebt_load_watcher(name, "target");
+}
+
 static void ebt_load_match_extensions(void)
 {
 	opts = ebt_original_options;
@@ -661,6 +671,8 @@  static void ebt_load_match_extensions(void)
 
 	ebt_load_watcher("log");
 	ebt_load_watcher("nflog");
+
+	ebt_load_target("mark");
 }
 
 static void ebt_add_match(struct xtables_match *m,