summaryrefslogtreecommitdiffstats
path: root/libxtables/xtables.c
diff options
context:
space:
mode:
authorArturo Borrero <arturo.borrero.glez@gmail.com>2015-02-13 11:38:02 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2015-02-18 23:43:07 +0100
commit34c36aeebd0b44629ef6c54a3087b3b531ccc1a5 (patch)
tree02bddf39a0090c482841ed544d5b6e1d6a9396e7 /libxtables/xtables.c
parent6dc53c514f1e4683e51a877b3a2f3128cfccef28 (diff)
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 <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'libxtables/xtables.c')
-rw-r--r--libxtables/xtables.c13
1 files changed, 13 insertions, 0 deletions
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__);