]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
xtables-compat: remove unused fields from bridge and arp families
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 16 Feb 2015 19:17:51 +0000 (20:17 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 18 Feb 2015 22:43:13 +0000 (23:43 +0100)
These two families only work under nft compat, so leave unset the fields
that we don't use. Basically, we need neither the module autoload code
nor the native get/setsockopt() revision infrastructure since we use the
one that nft_compat provides through nfnetlink.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
libxtables/xtables.c

index 0200c7a3f2159d3327bdd788daabc3d4c3b44137..9df12ce5cd1fecf51ddcc43419202658644d5e21 100644 (file)
@@ -168,24 +168,17 @@ static const struct xtables_afinfo afinfo_ipv6 = {
        .so_rev_target = IP6T_SO_GET_REVISION_TARGET,
 };
 
+/* Dummy families for arptables-compat and ebtables-compat. Leave structure
+ * fields that we don't use unset.
+ */
 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,
 };
 
 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;