From 4e5ed8d8165b3d4a16a6133cfc1b43118a0e2a3d Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Tue, 3 Feb 2015 16:29:35 +0100 Subject: ebtables-compat: add mark target extension Translate the mark target extension to the xtables-compat environment. Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- extensions/libebt_mark.c | 191 ++++++++++++++++++++++++++++ include/linux/netfilter_bridge/ebt_mark_t.h | 23 ++++ 2 files changed, 214 insertions(+) create mode 100644 extensions/libebt_mark.c create mode 100644 include/linux/netfilter_bridge/ebt_mark_t.h diff --git a/extensions/libebt_mark.c b/extensions/libebt_mark.c new file mode 100644 index 00000000..587b4a63 --- /dev/null +++ b/extensions/libebt_mark.c @@ -0,0 +1,191 @@ +/* ebt_mark + * + * Authors: + * Bart De Schuymer + * + * July, 2002, September 2006 + * + * Adapted by Arturo Borrero Gonzalez + * to use libxtables for ebtables-compat in 2015. + */ + +#include +#include +#include +#include +#include +#include +#include "iptables/nft.h" +#include "iptables/nft-bridge.h" + +static int mark_supplied; + +#define MARK_TARGET '1' +#define MARK_SETMARK '2' +#define MARK_ORMARK '3' +#define MARK_ANDMARK '4' +#define MARK_XORMARK '5' +static struct option brmark_opts[] = { + { .name = "mark-target",.has_arg = true, .val = MARK_TARGET }, + /* an oldtime messup, we should have always used the scheme + * -