diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-02-11 16:16:50 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-02-11 16:19:24 +0100 |
commit | 87f82cbd4f94cca74eb58506e117f226a2270759 (patch) | |
tree | c49b2f0ba1b80c0953c41f6c865cab92e30038eb /libxtables/xtables.c | |
parent | aa562a660d1555b13cffbac1e744033e91f82707 (diff) | |
parent | 24775a7a3178c163302560d2bd74ecc6ed0f7af4 (diff) |
Merge branch 'ebtables-compat'
The ebtables-compat branch provides the compatibility layer to run
ebtables extensions. Currently, only the following matches / targets /
watchers are supported:
* 802_3
* ip
* mark_m and mark
* log
The remaining ones should be easy to port them to on top of libxtables,
they will follow up later.
Diffstat (limited to 'libxtables/xtables.c')
-rw-r--r-- | libxtables/xtables.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libxtables/xtables.c b/libxtables/xtables.c index 68411248..16e4d969 100644 --- a/libxtables/xtables.c +++ b/libxtables/xtables.c @@ -168,6 +168,16 @@ static const struct xtables_afinfo afinfo_ipv6 = { .so_rev_target = IP6T_SO_GET_REVISION_TARGET, }; +static const struct xtables_afinfo afinfo_bridge = { + .kmod = "eb_tables", + .proc_exists = "/proc/net/eb_tables_names", + .libprefix = "libebt_", + .family = NFPROTO_BRIDGE, + .ipproto = IPPROTO_IP, + .so_rev_match = -1, + .so_rev_target = -1, +}; + const struct xtables_afinfo *afinfo; /* Search path for Xtables .so files */ @@ -224,6 +234,9 @@ void xtables_set_nfproto(uint8_t nfproto) case NFPROTO_IPV6: afinfo = &afinfo_ipv6; break; + case NFPROTO_BRIDGE: + afinfo = &afinfo_bridge; + break; default: fprintf(stderr, "libxtables: unhandled NFPROTO in %s\n", __func__); @@ -536,7 +549,7 @@ void xtables_parse_interface(const char *arg, char *vianame, static void *load_extension(const char *search_path, const char *af_prefix, const char *name, bool is_target) { - const char *all_prefixes[] = {"libxt_", af_prefix, NULL}; + const char *all_prefixes[] = {af_prefix, "libxt_", NULL}; const char **prefix; const char *dir = search_path, *next; void *ptr = NULL; |