diff options
author | Arturo Borrero <arturo.borrero.glez@gmail.com> | 2014-12-17 12:06:56 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-12-23 14:25:40 +0100 |
commit | 6aa7d1c26d0a3b0c909bbf13aa0ef6b179615433 (patch) | |
tree | bad6f55adb9a7e2842d4d453b0d175d6f691c41e /libxtables | |
parent | 84b69ea462eb2159ce6bde83d6bcf2eac0098f87 (diff) |
extensions: add ebt 802_3 extension
This patch adds the first ebtables extension to ebtables-compat.
The original 802_3 code is adapted to the xtables environment.
I tried to mimic as much as possible the original ebtables code paths.
With this patch, ebtables-compat is able to send the 802_3 match to the kernel,
but the kernel-to-userspace path is not tested and should be adjusted
in follow-up patches.
Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'libxtables')
-rw-r--r-- | libxtables/xtables.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libxtables/xtables.c b/libxtables/xtables.c index 68411248..6985a274 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__); |