]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: collapse registration structures
authorJan Engelhardt <jengelh@medozas.de>
Fri, 12 Jun 2009 18:55:44 +0000 (20:55 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Fri, 26 Jun 2009 19:13:09 +0000 (21:13 +0200)
There are no different code paths between IPV4 and IPV6, so
data can be consolidated here.

   text    data     bss     dec     hex filename
 243757   12212    2576  258545   3f1f1 ip6tables-static[before.i586]
 243613    9428    2576  255617   3e681 ip6tables-static[after.i586]
   -144   -2784

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
27 files changed:
extensions/libxt_CONNMARK.c
extensions/libxt_CONNSECMARK.c
extensions/libxt_DSCP.c
extensions/libxt_MARK.c
extensions/libxt_NFLOG.c
extensions/libxt_NFQUEUE.c
extensions/libxt_NOTRACK.c
extensions/libxt_TCPOPTSTRIP.c
extensions/libxt_TOS.c
extensions/libxt_comment.c
extensions/libxt_connbytes.c
extensions/libxt_connmark.c
extensions/libxt_dccp.c
extensions/libxt_dscp.c
extensions/libxt_esp.c
extensions/libxt_hashlimit.c
extensions/libxt_helper.c
extensions/libxt_mac.c
extensions/libxt_owner.c
extensions/libxt_physdev.c
extensions/libxt_recent.c
extensions/libxt_sctp.c
extensions/libxt_state.c
extensions/libxt_tcp.c
extensions/libxt_tcpmss.c
extensions/libxt_tos.c
extensions/libxt_udp.c

index 6e42898f9cad4b3eaee67a900ad330ef8181490a..5e9c37486844e670c5fbda30d6395b9fbc58dd12 100644 (file)
@@ -399,23 +399,7 @@ connmark_tg_save(const void *ip, const struct xt_entry_target *target)
 }
 
 static struct xtables_target connmark_target = {
-       .family         = NFPROTO_IPV4,
-       .name           = "CONNMARK",
-       .revision       = 0,
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_connmark_target_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_connmark_target_info)),
-       .help           = CONNMARK_help,
-       .init           = CONNMARK_init,
-       .parse          = CONNMARK_parse,
-       .final_check    = connmark_tg_check,
-       .print          = CONNMARK_print,
-       .save           = CONNMARK_save,
-       .extra_opts     = CONNMARK_opts,
-};
-
-static struct xtables_target connmark_target6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "CONNMARK",
        .revision       = 0,
        .version        = XTABLES_VERSION,
@@ -434,23 +418,7 @@ static struct xtables_target connmark_tg_reg = {
        .version        = XTABLES_VERSION,
        .name           = "CONNMARK",
        .revision       = 1,
-       .family         = NFPROTO_IPV4,
-       .size           = XT_ALIGN(sizeof(struct xt_connmark_tginfo1)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_connmark_tginfo1)),
-       .help           = connmark_tg_help,
-       .init           = connmark_tg_init,
-       .parse          = connmark_tg_parse,
-       .final_check    = connmark_tg_check,
-       .print          = connmark_tg_print,
-       .save           = connmark_tg_save,
-       .extra_opts     = connmark_tg_opts,
-};
-
-static struct xtables_target connmark_tg6_reg = {
-       .version        = XTABLES_VERSION,
-       .name           = "CONNMARK",
-       .revision       = 1,
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .size           = XT_ALIGN(sizeof(struct xt_connmark_tginfo1)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_connmark_tginfo1)),
        .help           = connmark_tg_help,
@@ -465,7 +433,5 @@ static struct xtables_target connmark_tg6_reg = {
 void _init(void)
 {
        xtables_register_target(&connmark_target);
-       xtables_register_target(&connmark_target6);
        xtables_register_target(&connmark_tg_reg);
-       xtables_register_target(&connmark_tg6_reg);
 }
index 11ec01ab3921c74fe45907f0386bc12f06ecab2b..d95339f39c3b100c0450e7a6592a35df602cc9dd 100644 (file)
@@ -107,22 +107,7 @@ CONNSECMARK_save(const void *ip, const struct xt_entry_target *target)
 }
 
 static struct xtables_target connsecmark_target = {
-       .family         = NFPROTO_IPV4,
-       .name           = "CONNSECMARK",
-       .version        = XTABLES_VERSION,
-       .revision       = 0,
-       .size           = XT_ALIGN(sizeof(struct xt_connsecmark_target_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_connsecmark_target_info)),
-       .parse          = CONNSECMARK_parse,
-       .help           = CONNSECMARK_help,
-       .final_check    = CONNSECMARK_check,
-       .print          = CONNSECMARK_print,
-       .save           = CONNSECMARK_save,
-       .extra_opts     = CONNSECMARK_opts,
-};
-
-static struct xtables_target connsecmark_target6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "CONNSECMARK",
        .version        = XTABLES_VERSION,
        .revision       = 0,
@@ -139,5 +124,4 @@ static struct xtables_target connsecmark_target6 = {
 void _init(void)
 {
        xtables_register_target(&connsecmark_target);
-       xtables_register_target(&connsecmark_target6);
 }
index ddb9c9973bcb5337f6d7c288d84c5696a469f2d4..82ac10c3a215cfcce6eee14fd1913eb29a1b4e18 100644 (file)
@@ -130,21 +130,7 @@ static void DSCP_save(const void *ip, const struct xt_entry_target *target)
 }
 
 static struct xtables_target dscp_target = {
-       .family         = NFPROTO_IPV4,
-       .name           = "DSCP",
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_DSCP_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_DSCP_info)),
-       .help           = DSCP_help,
-       .parse          = DSCP_parse,
-       .final_check    = DSCP_check,
-       .print          = DSCP_print,
-       .save           = DSCP_save,
-       .extra_opts     = DSCP_opts,
-};
-
-static struct xtables_target dscp_target6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "DSCP",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_DSCP_info)),
@@ -160,5 +146,4 @@ static struct xtables_target dscp_target6 = {
 void _init(void)
 {
        xtables_register_target(&dscp_target);
-       xtables_register_target(&dscp_target6);
 }
index ff48a76476bb8f2dede8d4be40366a1264aa5cca..cab052bac3acf37d0b468836104350e1556b9fe5 100644 (file)
@@ -278,7 +278,7 @@ static void mark_tg_save(const void *ip, const struct xt_entry_target *target)
 }
 
 static struct xtables_target mark_target_v0 = {
-       .family         = NFPROTO_IPV4,
+       .family         = NFPROTO_UNSPEC,
        .name           = "MARK",
        .version        = XTABLES_VERSION,
        .revision       = 0,
@@ -307,21 +307,6 @@ static struct xtables_target mark_target_v1 = {
        .extra_opts     = MARK_opts,
 };
 
-static struct xtables_target mark_target6_v0 = {
-       .family         = NFPROTO_IPV6,
-       .name           = "MARK",
-       .version        = XTABLES_VERSION,
-       .revision       = 0,
-       .size           = XT_ALIGN(sizeof(struct xt_mark_target_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_mark_target_info)),
-       .help           = MARK_help,
-       .parse          = MARK_parse_v0,
-       .final_check    = MARK_check,
-       .print          = MARK_print_v0,
-       .save           = MARK_save_v0,
-       .extra_opts     = MARK_opts,
-};
-
 static struct xtables_target mark_tg_reg_v2 = {
        .version       = XTABLES_VERSION,
        .name          = "MARK",
@@ -341,6 +326,5 @@ void _init(void)
 {
        xtables_register_target(&mark_target_v0);
        xtables_register_target(&mark_target_v1);
-       xtables_register_target(&mark_target6_v0);
        xtables_register_target(&mark_tg_reg_v2);
 }
index 007c7b4e2133ff9c613ffc7a1bf9182d99be6c19..0768e8857d3b6449b248c8a7276190c2bb6ddff3 100644 (file)
@@ -139,21 +139,7 @@ static void NFLOG_save(const void *ip, const struct xt_entry_target *target)
 }
 
 static struct xtables_target nflog_target = {
-       .family         = NFPROTO_IPV4,
-       .name           = "NFLOG",
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_nflog_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_nflog_info)),
-       .help           = NFLOG_help,
-       .init           = NFLOG_init,
-       .parse          = NFLOG_parse,
-       .print          = NFLOG_print,
-       .save           = NFLOG_save,
-       .extra_opts     = NFLOG_opts,
-};
-
-static struct xtables_target nflog_target6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "NFLOG",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_nflog_info)),
@@ -169,5 +155,4 @@ static struct xtables_target nflog_target6 = {
 void _init(void)
 {
        xtables_register_target(&nflog_target);
-       xtables_register_target(&nflog_target6);
 }
index 3ca2239fb1f3fc269344a07275150cdd4db43335..53ecf1ca51b66af7e49ce4bce06fcb7f9657c80f 100644 (file)
@@ -78,7 +78,7 @@ static void NFQUEUE_save(const void *ip, const struct xt_entry_target *target)
 }
 
 static struct xtables_target nfqueue_target = {
-       .family         = NFPROTO_IPV4,
+       .family         = NFPROTO_UNSPEC,
        .name           = "NFQUEUE",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_NFQ_info)),
@@ -90,21 +90,7 @@ static struct xtables_target nfqueue_target = {
        .extra_opts     = NFQUEUE_opts
 };
 
-static struct xtables_target nfqueue_target6 = {
-       .family         = NFPROTO_IPV6,
-       .name           = "NFQUEUE",
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_NFQ_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_NFQ_info)),
-       .help           = NFQUEUE_help,
-       .parse          = NFQUEUE_parse,
-       .print          = NFQUEUE_print,
-       .save           = NFQUEUE_save,
-       .extra_opts     = NFQUEUE_opts,
-};
-
 void _init(void)
 {
        xtables_register_target(&nfqueue_target);
-       xtables_register_target(&nfqueue_target6);
 }
index ef266543dd66724c6456942b2ceab65c102849ce..d997d84f4e3643dac5a5feccf5e35dde999f4d85 100644 (file)
@@ -20,17 +20,7 @@ NOTRACK_parse(int c, char **argv, int invert, unsigned int *flags,
 }
 
 static struct xtables_target notrack_target = {
-       .family         = NFPROTO_IPV4,
-       .name           = "NOTRACK",
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(0),
-       .userspacesize  = XT_ALIGN(0),
-       .help           = NOTRACK_help,
-       .parse          = NOTRACK_parse,
-};
-
-static struct xtables_target notrack_target6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "NOTRACK",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(0),
@@ -42,5 +32,4 @@ static struct xtables_target notrack_target6 = {
 void _init(void)
 {
        xtables_register_target(&notrack_target);
-       xtables_register_target(&notrack_target6);
 }
index cf946fc7b2ea41b27947b5cee340b6580781e5b9..a063d0d93193d4546e0ed937d8450de4e652611a 100644 (file)
@@ -180,22 +180,7 @@ tcpoptstrip_tg_save(const void *ip, const struct xt_entry_target *target)
 static struct xtables_target tcpoptstrip_tg_reg = {
        .version       = XTABLES_VERSION,
        .name          = "TCPOPTSTRIP",
-       .family        = NFPROTO_IPV4,
-       .size          = XT_ALIGN(sizeof(struct xt_tcpoptstrip_target_info)),
-       .userspacesize = XT_ALIGN(sizeof(struct xt_tcpoptstrip_target_info)),
-       .help          = tcpoptstrip_tg_help,
-       .init          = tcpoptstrip_tg_init,
-       .parse         = tcpoptstrip_tg_parse,
-       .final_check   = tcpoptstrip_tg_check,
-       .print         = tcpoptstrip_tg_print,
-       .save          = tcpoptstrip_tg_save,
-       .extra_opts    = tcpoptstrip_tg_opts,
-};
-
-static struct xtables_target tcpoptstrip_tg6_reg = {
-       .version       = XTABLES_VERSION,
-       .name          = "TCPOPTSTRIP",
-       .family        = NFPROTO_IPV6,
+       .family        = NFPROTO_UNSPEC,
        .size          = XT_ALIGN(sizeof(struct xt_tcpoptstrip_target_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_tcpoptstrip_target_info)),
        .help          = tcpoptstrip_tg_help,
@@ -210,5 +195,4 @@ static struct xtables_target tcpoptstrip_tg6_reg = {
 void _init(void)
 {
        xtables_register_target(&tcpoptstrip_tg_reg);
-       xtables_register_target(&tcpoptstrip_tg6_reg);
 }
index c08f53bd7e7a97420d1590cc9c96e946a9d01047..e6382e14f961451374c3f5aa9534ad342ceacb49 100644 (file)
@@ -224,22 +224,7 @@ static struct xtables_target tos_tg_reg = {
        .version       = XTABLES_VERSION,
        .name          = "TOS",
        .revision      = 1,
-       .family        = NFPROTO_IPV4,
-       .size          = XT_ALIGN(sizeof(struct xt_tos_target_info)),
-       .userspacesize = XT_ALIGN(sizeof(struct xt_tos_target_info)),
-       .help          = tos_tg_help,
-       .parse         = tos_tg_parse,
-       .final_check   = tos_tg_check,
-       .print         = tos_tg_print,
-       .save          = tos_tg_save,
-       .extra_opts    = tos_tg_opts,
-};
-
-static struct xtables_target tos_tg6_reg = {
-       .version       = XTABLES_VERSION,
-       .name          = "TOS",
-       .family        = NFPROTO_IPV6,
-       .revision      = 1,
+       .family        = NFPROTO_UNSPEC,
        .size          = XT_ALIGN(sizeof(struct xt_tos_target_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_tos_target_info)),
        .help          = tos_tg_help,
@@ -254,5 +239,4 @@ void _init(void)
 {
        xtables_register_target(&tos_tg_reg_v0);
        xtables_register_target(&tos_tg_reg);
-       xtables_register_target(&tos_tg6_reg);
 }
index 5f393bbfd8dadabd2177a715d513da24cb4ed4db..2e665b12ec2797ab5d3dc10822c393f4b1569773 100644 (file)
@@ -89,21 +89,7 @@ comment_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match comment_match = {
-       .family         = NFPROTO_IPV4,
-       .name           = "comment",
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_comment_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_comment_info)),
-       .help           = comment_help,
-       .parse          = comment_parse,
-       .final_check    = comment_check,
-       .print          = comment_print,
-       .save           = comment_save,
-       .extra_opts     = comment_opts,
-};
-
-static struct xtables_match comment_match6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "comment",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_comment_info)),
@@ -119,5 +105,4 @@ static struct xtables_match comment_match6 = {
 void _init(void)
 {
        xtables_register_match(&comment_match);
-       xtables_register_match(&comment_match6);
 }
index c7bdff05309abae610679e452c9c73bc328ee482..d6c3b1bb228f9747afb5daafd8025d034b21f17e 100644 (file)
@@ -180,21 +180,7 @@ static void connbytes_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match connbytes_match = {
-       .family         = NFPROTO_IPV4,
-       .name           = "connbytes",
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_connbytes_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_connbytes_info)),
-       .help           = connbytes_help,
-       .parse          = connbytes_parse,
-       .final_check    = connbytes_check,
-       .print          = connbytes_print,
-       .save           = connbytes_save,
-       .extra_opts     = connbytes_opts,
-};
-
-static struct xtables_match connbytes_match6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "connbytes",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_connbytes_info)),
@@ -210,5 +196,4 @@ static struct xtables_match connbytes_match6 = {
 void _init(void)
 {
        xtables_register_match(&connbytes_match);
-       xtables_register_match(&connbytes_match6);
 }
index ce2002ce0a4108669c1cb362ee74c7f3d796a996..db7c3a1979b353dd9c76f6331ff4c67e3ee3d15d 100644 (file)
@@ -164,22 +164,7 @@ connmark_mt_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match connmark_mt_reg_v0 = {
-       .family         = NFPROTO_IPV4,
-       .name           = "connmark",
-       .revision       = 0,
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_connmark_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_connmark_info)),
-       .help           = connmark_mt_help,
-       .parse          = connmark_parse,
-       .final_check    = connmark_mt_check,
-       .print          = connmark_print,
-       .save           = connmark_save,
-       .extra_opts     = connmark_mt_opts,
-};
-
-static struct xtables_match connmark_mt6_reg_v0 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "connmark",
        .revision       = 0,
        .version        = XTABLES_VERSION,
@@ -197,22 +182,7 @@ static struct xtables_match connmark_mt_reg = {
        .version        = XTABLES_VERSION,
        .name           = "connmark",
        .revision       = 1,
-       .family         = NFPROTO_IPV4,
-       .size           = XT_ALIGN(sizeof(struct xt_connmark_mtinfo1)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_connmark_mtinfo1)),
-       .help           = connmark_mt_help,
-       .parse          = connmark_mt_parse,
-       .final_check    = connmark_mt_check,
-       .print          = connmark_mt_print,
-       .save           = connmark_mt_save,
-       .extra_opts     = connmark_mt_opts,
-};
-
-static struct xtables_match connmark_mt6_reg = {
-       .version        = XTABLES_VERSION,
-       .name           = "connmark",
-       .revision       = 1,
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .size           = XT_ALIGN(sizeof(struct xt_connmark_mtinfo1)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_connmark_mtinfo1)),
        .help           = connmark_mt_help,
@@ -226,7 +196,5 @@ static struct xtables_match connmark_mt6_reg = {
 void _init(void)
 {
        xtables_register_match(&connmark_mt_reg_v0);
-       xtables_register_match(&connmark_mt6_reg_v0);
        xtables_register_match(&connmark_mt_reg);
-       xtables_register_match(&connmark_mt6_reg);
 }
index 73211459ab224501d582378d98599dc759feed56..ae23225c8d8b94edd81769f5a9da409443565987 100644 (file)
@@ -336,21 +336,7 @@ static void dccp_save(const void *ip, const struct xt_entry_match *match)
 
 static struct xtables_match dccp_match = {
        .name           = "dccp",
-       .family         = NFPROTO_IPV4,
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_dccp_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_dccp_info)),
-       .help           = dccp_help,
-       .init           = dccp_init,
-       .parse          = dccp_parse,
-       .print          = dccp_print,
-       .save           = dccp_save,
-       .extra_opts     = dccp_opts,
-};
-
-static struct xtables_match dccp_match6 = {
-       .name           = "dccp",
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_dccp_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_dccp_info)),
@@ -365,5 +351,4 @@ static struct xtables_match dccp_match6 = {
 void _init(void)
 {
        xtables_register_match(&dccp_match);
-       xtables_register_match(&dccp_match6);
 }
index 62fa6af5a7f294bb19cdb8b6b42876f100a414e1..306643e86a0c03487dacdab9f803c3466acf9606 100644 (file)
@@ -131,21 +131,7 @@ static void dscp_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match dscp_match = {
-       .family         = NFPROTO_IPV4,
-       .name           = "dscp",
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_dscp_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_dscp_info)),
-       .help           = dscp_help,
-       .parse          = dscp_parse,
-       .final_check    = dscp_check,
-       .print          = dscp_print,
-       .save           = dscp_save,
-       .extra_opts     = dscp_opts,
-};
-
-static struct xtables_match dscp_match6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "dscp",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_dscp_info)),
@@ -161,5 +147,4 @@ static struct xtables_match dscp_match6 = {
 void _init(void)
 {
        xtables_register_match(&dscp_match);
-       xtables_register_match(&dscp_match6);
 }
index 5769edb56f55af8bcad0b05df40da761cfecfee5..89c3fb4343ab7df6646d1af153607958fb3d0291 100644 (file)
@@ -149,21 +149,7 @@ static void esp_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match esp_match = {
-       .family         = NFPROTO_IPV4,
-       .name           = "esp",
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_esp)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_esp)),
-       .help           = esp_help,
-       .init           = esp_init,
-       .parse          = esp_parse,
-       .print          = esp_print,
-       .save           = esp_save,
-       .extra_opts     = esp_opts,
-};
-
-static struct xtables_match esp_match6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "esp",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_esp)),
@@ -180,5 +166,4 @@ void
 _init(void)
 {
        xtables_register_match(&esp_match);
-       xtables_register_match(&esp_match6);
 }
index 84dd786864c5c58895c33a755969794b3e81a3b4..9d8c86aabcad4f4eb9388fa58219c2764b2b7fb3 100644 (file)
@@ -660,23 +660,7 @@ hashlimit_mt6_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match hashlimit_match = {
-       .family         = NFPROTO_IPV4,
-       .name           = "hashlimit",
-       .version        = XTABLES_VERSION,
-       .revision       = 0,
-       .size           = XT_ALIGN(sizeof(struct xt_hashlimit_info)),
-       .userspacesize  = offsetof(struct xt_hashlimit_info, hinfo),
-       .help           = hashlimit_help,
-       .init           = hashlimit_init,
-       .parse          = hashlimit_parse,
-       .final_check    = hashlimit_check,
-       .print          = hashlimit_print,
-       .save           = hashlimit_save,
-       .extra_opts     = hashlimit_opts,
-};
-
-static struct xtables_match hashlimit_match6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "hashlimit",
        .version        = XTABLES_VERSION,
        .revision       = 0,
@@ -726,7 +710,6 @@ static struct xtables_match hashlimit_mt6_reg = {
 void _init(void)
 {
        xtables_register_match(&hashlimit_match);
-       xtables_register_match(&hashlimit_match6);
        xtables_register_match(&hashlimit_mt_reg);
        xtables_register_match(&hashlimit_mt6_reg);
 }
index 7b56bef43a7c752ae6b9f39fb68a528e6fded012..22c3113d8afd7d7e0cceb5ae0c7e2d21dcbc01b8 100644 (file)
@@ -69,20 +69,7 @@ static void helper_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match helper_match = {
-       .family         = NFPROTO_IPV4,
-       .name           = "helper",
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_helper_info)),
-       .help           = helper_help,
-       .parse          = helper_parse,
-       .final_check    = helper_check,
-       .print          = helper_print,
-       .save           = helper_save,
-       .extra_opts     = helper_opts,
-};
-
-static struct xtables_match helper_match6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "helper",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_helper_info)),
@@ -97,5 +84,4 @@ static struct xtables_match helper_match6 = {
 void _init(void)
 {
        xtables_register_match(&helper_match);
-       xtables_register_match(&helper_match6);
 }
index a57e341024823667562673a7d0d8819511aefdbf..449fff92240410f5bdc9e3c007e5814b84b29db0 100644 (file)
@@ -112,21 +112,7 @@ static void mac_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match mac_match = {
-       .family         = NFPROTO_IPV4,
-       .name           = "mac",
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_mac_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_mac_info)),
-       .help           = mac_help,
-       .parse          = mac_parse,
-       .final_check    = mac_check,
-       .print          = mac_print,
-       .save           = mac_save,
-       .extra_opts     = mac_opts,
-};
-
-static struct xtables_match mac_match6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "mac",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_mac_info)),
@@ -142,5 +128,4 @@ static struct xtables_match mac_match6 = {
 void _init(void)
 {
        xtables_register_match(&mac_match);
-       xtables_register_match(&mac_match6);
 }
index d27b3ae5768634857d7084f536002607bf0edfe5..f1d6b4ab0712af010b58eebdbf17bc99d5cb1808 100644 (file)
@@ -567,22 +567,7 @@ static struct xtables_match owner_mt_reg = {
        .version       = XTABLES_VERSION,
        .name          = "owner",
        .revision      = 1,
-       .family        = NFPROTO_IPV4,
-       .size          = XT_ALIGN(sizeof(struct xt_owner_match_info)),
-       .userspacesize = XT_ALIGN(sizeof(struct xt_owner_match_info)),
-       .help          = owner_mt_help,
-       .parse         = owner_mt_parse,
-       .final_check   = owner_mt_check,
-       .print         = owner_mt_print,
-       .save          = owner_mt_save,
-       .extra_opts    = owner_mt_opts,
-};
-
-static struct xtables_match owner_mt6_reg = {
-       .version       = XTABLES_VERSION,
-       .name          = "owner",
-       .revision      = 1,
-       .family        = NFPROTO_IPV6,
+       .family        = NFPROTO_UNSPEC,
        .size          = XT_ALIGN(sizeof(struct xt_owner_match_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_owner_match_info)),
        .help          = owner_mt_help,
@@ -598,5 +583,4 @@ void _init(void)
        xtables_register_match(&owner_mt_reg_v0);
        xtables_register_match(&owner_mt6_reg_v0);
        xtables_register_match(&owner_mt_reg);
-       xtables_register_match(&owner_mt6_reg);
 }
index 5522a32574d130b74f69c49d05ac4e5139ede267..74d311da432e8ab5614c52f649b8e02402e69d45 100644 (file)
@@ -161,21 +161,7 @@ static void physdev_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match physdev_match = {
-       .family         = NFPROTO_IPV4,
-       .name           = "physdev",
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_physdev_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_physdev_info)),
-       .help           = physdev_help,
-       .parse          = physdev_parse,
-       .final_check    = physdev_check,
-       .print          = physdev_print,
-       .save           = physdev_save,
-       .extra_opts     = physdev_opts,
-};
-
-static struct xtables_match physdev_match6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "physdev",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_physdev_info)),
@@ -191,5 +177,4 @@ static struct xtables_match physdev_match6 = {
 void _init(void)
 {
        xtables_register_match(&physdev_match);
-       xtables_register_match(&physdev_match6);
 }
index 47c35ff7791d95a155806d6586464732b5e4c4f2..d503685cb6ed2066d3aae17e338c191e31e8cb71 100644 (file)
@@ -215,7 +215,7 @@ static void recent_save(const void *ip, const struct xt_entry_match *match)
 static struct xtables_match recent_mt_reg = {
     .name          = "recent",
     .version       = XTABLES_VERSION,
-    .family        = NFPROTO_IPV4,
+    .family        = NFPROTO_UNSPEC,
     .size          = XT_ALIGN(sizeof(struct xt_recent_mtinfo)),
     .userspacesize = XT_ALIGN(sizeof(struct xt_recent_mtinfo)),
     .help          = recent_help,
@@ -227,24 +227,7 @@ static struct xtables_match recent_mt_reg = {
     .extra_opts    = recent_opts,
 };
 
-static struct xtables_match recent_mt6_reg = {
-       .version       = XTABLES_VERSION,
-       .name          = "recent",
-       .revision      = 0,
-       .family        = NFPROTO_IPV6,
-       .size          = XT_ALIGN(sizeof(struct xt_recent_mtinfo)),
-       .userspacesize = XT_ALIGN(sizeof(struct xt_recent_mtinfo)),
-       .help          = recent_help,
-       .init          = recent_init,
-       .parse         = recent_parse,
-       .final_check   = recent_check,
-       .print         = recent_print,
-       .save          = recent_save,
-       .extra_opts    = recent_opts,
-};
-
 void _init(void)
 {
        xtables_register_match(&recent_mt_reg);
-       xtables_register_match(&recent_mt6_reg);
 }
index 829eade00d592c5abec527d959fa0085a1737a81..dfa72d3d50ef72529730c69eda233ff4ff0505b1 100644 (file)
@@ -496,21 +496,7 @@ static void sctp_save(const void *ip, const struct xt_entry_match *match)
 
 static struct xtables_match sctp_match = {
        .name           = "sctp",
-       .family         = NFPROTO_IPV4,
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_sctp_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_sctp_info)),
-       .help           = sctp_help,
-       .init           = sctp_init,
-       .parse          = sctp_parse,
-       .print          = sctp_print,
-       .save           = sctp_save,
-       .extra_opts     = sctp_opts,
-};
-
-static struct xtables_match sctp_match6 = {
-       .name           = "sctp",
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_sctp_info)),
        .userspacesize  = XT_ALIGN(sizeof(struct xt_sctp_info)),
@@ -525,5 +511,4 @@ static struct xtables_match sctp_match6 = {
 void _init(void)
 {
        xtables_register_match(&sctp_match);
-       xtables_register_match(&sctp_match6);
 }
index 7387e26486ae059f78343fca0ebfabb7297c282c..c8a7454a2605eb88d1531b396f3bb58c0108450a 100644 (file)
@@ -139,21 +139,7 @@ static void state_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match state_match = { 
-       .family         = NFPROTO_IPV4,
-       .name           = "state",
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_state_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_state_info)),
-       .help           = state_help,
-       .parse          = state_parse,
-       .final_check    = state_final_check,
-       .print          = state_print,
-       .save           = state_save,
-       .extra_opts     = state_opts,
-};
-
-static struct xtables_match state_match6 = { 
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "state",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_state_info)),
@@ -169,5 +155,4 @@ static struct xtables_match state_match6 = {
 void _init(void)
 {
        xtables_register_match(&state_match);
-       xtables_register_match(&state_match6);
 }
index 5ea9ebd2bb15bb9e2dfafe22cc66204f47600819..7abecc1629e584d242426a9ae63d8ac2e9e2cfcb 100644 (file)
@@ -375,21 +375,7 @@ static void tcp_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match tcp_match = {
-       .family         = NFPROTO_IPV4,
-       .name           = "tcp",
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_tcp)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_tcp)),
-       .help           = tcp_help,
-       .init           = tcp_init,
-       .parse          = tcp_parse,
-       .print          = tcp_print,
-       .save           = tcp_save,
-       .extra_opts     = tcp_opts,
-};
-
-static struct xtables_match tcp_match6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "tcp",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_tcp)),
@@ -406,5 +392,4 @@ void
 _init(void)
 {
        xtables_register_match(&tcp_match);
-       xtables_register_match(&tcp_match6);
 }
index 46529f9788d8b79731defedde6d4f23df9e3e195..36785a320141fb51be54b3b8e78c2a743a229072 100644 (file)
@@ -109,21 +109,7 @@ static void tcpmss_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match tcpmss_match = {
-       .family         = NFPROTO_IPV4,
-       .name           = "tcpmss",
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_tcpmss_match_info)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_tcpmss_match_info)),
-       .help           = tcpmss_help,
-       .parse          = tcpmss_parse,
-       .final_check    = tcpmss_check,
-       .print          = tcpmss_print,
-       .save           = tcpmss_save,
-       .extra_opts     = tcpmss_opts,
-};
-
-static struct xtables_match tcpmss_match6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "tcpmss",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_tcpmss_match_info)),
@@ -139,5 +125,4 @@ static struct xtables_match tcpmss_match6 = {
 void _init(void)
 {
        xtables_register_match(&tcpmss_match);
-       xtables_register_match(&tcpmss_match6);
 }
index b810ea6d7a34f725a15f6c9e812a9966a21a1b36..1f7b2cd0d015029cde8aabc6fb4b7fd53a416a4e 100644 (file)
@@ -155,22 +155,7 @@ static struct xtables_match tos_mt_reg_v0 = {
 static struct xtables_match tos_mt_reg = {
        .version       = XTABLES_VERSION,
        .name          = "tos",
-       .family        = NFPROTO_IPV4,
-       .revision      = 1,
-       .size          = XT_ALIGN(sizeof(struct xt_tos_match_info)),
-       .userspacesize = XT_ALIGN(sizeof(struct xt_tos_match_info)),
-       .help          = tos_mt_help,
-       .parse         = tos_mt_parse,
-       .final_check   = tos_mt_check,
-       .print         = tos_mt_print,
-       .save          = tos_mt_save,
-       .extra_opts    = tos_mt_opts,
-};
-
-static struct xtables_match tos_mt6_reg = {
-       .version       = XTABLES_VERSION,
-       .name          = "tos",
-       .family        = NFPROTO_IPV6,
+       .family        = NFPROTO_UNSPEC,
        .revision      = 1,
        .size          = XT_ALIGN(sizeof(struct xt_tos_match_info)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_tos_match_info)),
@@ -186,5 +171,4 @@ void _init(void)
 {
        xtables_register_match(&tos_mt_reg_v0);
        xtables_register_match(&tos_mt_reg);
-       xtables_register_match(&tos_mt6_reg);
 }
index 4b4e84fbcd7f3c3788f1e32f3577166f453ca66e..bf0b34fb8b4b54364d4638c4ee9c17919f265d07 100644 (file)
@@ -191,21 +191,7 @@ static void udp_save(const void *ip, const struct xt_entry_match *match)
 }
 
 static struct xtables_match udp_match = {
-       .family         = NFPROTO_IPV4,
-       .name           = "udp",
-       .version        = XTABLES_VERSION,
-       .size           = XT_ALIGN(sizeof(struct xt_udp)),
-       .userspacesize  = XT_ALIGN(sizeof(struct xt_udp)),
-       .help           = udp_help,
-       .init           = udp_init,
-       .parse          = udp_parse,
-       .print          = udp_print,
-       .save           = udp_save,
-       .extra_opts     = udp_opts,
-};
-
-static struct xtables_match udp_match6 = {
-       .family         = NFPROTO_IPV6,
+       .family         = NFPROTO_UNSPEC,
        .name           = "udp",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(sizeof(struct xt_udp)),
@@ -222,5 +208,4 @@ void
 _init(void)
 {
        xtables_register_match(&udp_match);
-       xtables_register_match(&udp_match6);
 }