summaryrefslogtreecommitdiffstats
path: root/libxtables/xtables.c
diff options
context:
space:
mode:
Diffstat (limited to 'libxtables/xtables.c')
-rw-r--r--libxtables/xtables.c15
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;