From 88231c40a933a4507f9e4900857498f5e34a9ff9 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Tue, 10 Apr 2018 12:53:38 +0200 Subject: ebtables-compat: load mark target Its already there but it did not work because it wasn't loaded. Signed-off-by: Florian Westphal Acked-by: Pablo Neira Ayuso --- iptables/xtables-eb.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'iptables/xtables-eb.c') diff --git a/iptables/xtables-eb.c b/iptables/xtables-eb.c index 33f7851e..596894fd 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, -- cgit v1.2.3