From 34c36aeebd0b44629ef6c54a3087b3b531ccc1a5 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Fri, 13 Feb 2015 11:38:02 +0100 Subject: arptables-compat: add mangle target extension This patch adds support to use the mangle target extensions, along with the required changes in the surrounding code. Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- libxtables/xtables.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libxtables') diff --git a/libxtables/xtables.c b/libxtables/xtables.c index 16e4d969..0200c7a3 100644 --- a/libxtables/xtables.c +++ b/libxtables/xtables.c @@ -178,6 +178,16 @@ static const struct xtables_afinfo afinfo_bridge = { .so_rev_target = -1, }; +static const struct xtables_afinfo afinfo_arp = { + .kmod = "arp_tables", + .proc_exists = "/proc/net/eb_tables_names", + .libprefix = "libarpt_", + .family = NFPROTO_ARP, + .ipproto = IPPROTO_IP, + .so_rev_match = -1, + .so_rev_target = -1, +}; + const struct xtables_afinfo *afinfo; /* Search path for Xtables .so files */ @@ -237,6 +247,9 @@ void xtables_set_nfproto(uint8_t nfproto) case NFPROTO_BRIDGE: afinfo = &afinfo_bridge; break; + case NFPROTO_ARP: + afinfo = &afinfo_arp; + break; default: fprintf(stderr, "libxtables: unhandled NFPROTO in %s\n", __func__); -- cgit v1.2.3