summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/libip6t_LOG.c6
-rw-r--r--extensions/libip6t_REJECT.c6
-rw-r--r--extensions/libip6t_ah.c7
-rw-r--r--extensions/libip6t_dst.c7
-rw-r--r--extensions/libip6t_eui64.c6
-rw-r--r--extensions/libip6t_frag.c7
-rw-r--r--extensions/libip6t_hbh.c7
-rw-r--r--extensions/libip6t_mh.c6
-rw-r--r--extensions/libip6t_rt.c7
-rw-r--r--extensions/libipt_LOG.c6
-rw-r--r--extensions/libipt_MASQUERADE.c6
-rw-r--r--extensions/libipt_MIRROR.c6
-rw-r--r--extensions/libipt_REDIRECT.c6
-rw-r--r--extensions/libipt_REJECT.c6
-rw-r--r--extensions/libipt_ULOG.c6
-rw-r--r--extensions/libipt_ah.c7
-rw-r--r--extensions/libipt_icmp.c6
-rw-r--r--extensions/libipt_unclean.c6
-rw-r--r--extensions/libxt_NFLOG.c7
-rw-r--r--extensions/libxt_NFQUEUE.c7
-rw-r--r--extensions/libxt_NOTRACK.c7
-rw-r--r--extensions/libxt_TRACE.c7
-rw-r--r--extensions/libxt_dccp.c7
-rw-r--r--extensions/libxt_esp.c8
-rw-r--r--extensions/libxt_limit.c7
-rw-r--r--extensions/libxt_quota.c8
-rw-r--r--extensions/libxt_sctp.c7
-rw-r--r--extensions/libxt_standard.c7
-rw-r--r--extensions/libxt_tcp.c8
-rw-r--r--extensions/libxt_time.c6
-rw-r--r--extensions/libxt_u32.c6
-rw-r--r--extensions/libxt_udp.c8
-rw-r--r--ip6tables.c5
-rw-r--r--iptables.c5
34 files changed, 6 insertions, 218 deletions
diff --git a/extensions/libip6t_LOG.c b/extensions/libip6t_LOG.c
index 2001f76..737a597 100644
--- a/extensions/libip6t_LOG.c
+++ b/extensions/libip6t_LOG.c
@@ -199,11 +199,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-/* Final check; nothing. */
-static void final_check(unsigned int flags)
-{
-}
-
/* Prints out the targinfo. */
static void
print(const void *ip,
@@ -278,7 +273,6 @@ struct ip6tables_target log
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libip6t_REJECT.c b/extensions/libip6t_REJECT.c
index 3870f1b..1d8c5d5 100644
--- a/extensions/libip6t_REJECT.c
+++ b/extensions/libip6t_REJECT.c
@@ -113,11 +113,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 0;
}
-/* Final check; nothing. */
-static void final_check(unsigned int flags)
-{
-}
-
/* Prints out ipt_reject_info. */
static void
print(const void *ip,
@@ -158,7 +153,6 @@ struct ip6tables_target reject = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts,
diff --git a/extensions/libip6t_ah.c b/extensions/libip6t_ah.c
index 3b6126c..0b8652d 100644
--- a/extensions/libip6t_ah.c
+++ b/extensions/libip6t_ah.c
@@ -125,12 +125,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-/* Final check; we don't care. */
-static void
-final_check(unsigned int flags)
-{
-}
-
static void
print_spis(const char *name, u_int32_t min, u_int32_t max,
int invert)
@@ -213,7 +207,6 @@ struct ip6tables_match ah = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libip6t_dst.c b/extensions/libip6t_dst.c
index ed60d5d..d1662fd 100644
--- a/extensions/libip6t_dst.c
+++ b/extensions/libip6t_dst.c
@@ -179,12 +179,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-/* Final check; we don't care. */
-static void
-final_check(unsigned int flags)
-{
-}
-
static void
print_options(int optsnr, u_int16_t *optsp)
{
@@ -255,7 +249,6 @@ struct ip6tables_match optstruct = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libip6t_eui64.c b/extensions/libip6t_eui64.c
index a38af34..f6830d4 100644
--- a/extensions/libip6t_eui64.c
+++ b/extensions/libip6t_eui64.c
@@ -32,11 +32,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 0;
}
-/* Final check */
-static void final_check(unsigned int flags)
-{
-}
-
/* Prints out the matchinfo. */
static void
print(const void *ip,
@@ -59,7 +54,6 @@ static struct ip6tables_match eui64 = {
.userspacesize = IP6T_ALIGN(sizeof(int)),
.help = &help,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
};
diff --git a/extensions/libip6t_frag.c b/extensions/libip6t_frag.c
index 05fc8b2..49044a5 100644
--- a/extensions/libip6t_frag.c
+++ b/extensions/libip6t_frag.c
@@ -156,12 +156,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-/* Final check; we don't care. */
-static void
-final_check(unsigned int flags)
-{
-}
-
static void
print_ids(const char *name, u_int32_t min, u_int32_t max,
int invert)
@@ -258,7 +252,6 @@ struct ip6tables_match frag = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libip6t_hbh.c b/extensions/libip6t_hbh.c
index 229c5e7..09363b4 100644
--- a/extensions/libip6t_hbh.c
+++ b/extensions/libip6t_hbh.c
@@ -177,12 +177,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-/* Final check; we don't care. */
-static void
-final_check(unsigned int flags)
-{
-}
-
static void
print_options(int optsnr, u_int16_t *optsp)
{
@@ -248,7 +242,6 @@ static struct ip6tables_match optstruct = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts,
diff --git a/extensions/libip6t_mh.c b/extensions/libip6t_mh.c
index 99809c0..24ab499 100644
--- a/extensions/libip6t_mh.c
+++ b/extensions/libip6t_mh.c
@@ -150,11 +150,6 @@ static int parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-/* Final check; we don't care. */
-static void final_check(unsigned int flags)
-{
-}
-
static const char *type_to_name(u_int8_t type)
{
unsigned int i;
@@ -238,7 +233,6 @@ static struct ip6tables_match mh = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts,
diff --git a/extensions/libip6t_rt.c b/extensions/libip6t_rt.c
index efcbf5d..036f101 100644
--- a/extensions/libip6t_rt.c
+++ b/extensions/libip6t_rt.c
@@ -237,12 +237,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-/* Final check; we don't care. */
-static void
-final_check(unsigned int flags)
-{
-}
-
static void
print_nums(const char *name, u_int32_t min, u_int32_t max,
int invert)
@@ -348,7 +342,6 @@ static struct ip6tables_match rt = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts,
diff --git a/extensions/libipt_LOG.c b/extensions/libipt_LOG.c
index e983904..cf8990a 100644
--- a/extensions/libipt_LOG.c
+++ b/extensions/libipt_LOG.c
@@ -199,11 +199,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-/* Final check; nothing. */
-static void final_check(unsigned int flags)
-{
-}
-
/* Prints out the targinfo. */
static void
print(const void *ip,
@@ -278,7 +273,6 @@ struct iptables_target log
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libipt_MASQUERADE.c b/extensions/libipt_MASQUERADE.c
index 5796b27..c502667 100644
--- a/extensions/libipt_MASQUERADE.c
+++ b/extensions/libipt_MASQUERADE.c
@@ -115,11 +115,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
}
}
-/* Final check; don't care. */
-static void final_check(unsigned int flags)
-{
-}
-
/* Prints out the targinfo. */
static void
print(const void *ip,
@@ -169,7 +164,6 @@ static struct iptables_target masq = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libipt_MIRROR.c b/extensions/libipt_MIRROR.c
index 292b13d..a75ff9c 100644
--- a/extensions/libipt_MIRROR.c
+++ b/extensions/libipt_MIRROR.c
@@ -26,11 +26,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 0;
}
-static void
-final_check(unsigned int flags)
-{
-}
-
static struct iptables_target mirror = {
.name = "MIRROR",
.version = IPTABLES_VERSION,
@@ -38,7 +33,6 @@ static struct iptables_target mirror = {
.userspacesize = IPT_ALIGN(0),
.help = &help,
.parse = &parse,
- .final_check = &final_check,
.print = NULL,
.save = NULL,
};
diff --git a/extensions/libipt_REDIRECT.c b/extensions/libipt_REDIRECT.c
index 794a208..8fa1c32 100644
--- a/extensions/libipt_REDIRECT.c
+++ b/extensions/libipt_REDIRECT.c
@@ -124,11 +124,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
}
}
-/* Final check; don't care. */
-static void final_check(unsigned int flags)
-{
-}
-
/* Prints out the targinfo. */
static void
print(const void *ip,
@@ -177,7 +172,6 @@ static struct iptables_target redir = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libipt_REJECT.c b/extensions/libipt_REJECT.c
index 90ec163..c2b3b35 100644
--- a/extensions/libipt_REJECT.c
+++ b/extensions/libipt_REJECT.c
@@ -132,11 +132,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 0;
}
-/* Final check; nothing. */
-static void final_check(unsigned int flags)
-{
-}
-
/* Prints out ipt_reject_info. */
static void
print(const void *ip,
@@ -176,7 +171,6 @@ static struct iptables_target reject = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libipt_ULOG.c b/extensions/libipt_ULOG.c
index aa98f6e..2fda85d 100644
--- a/extensions/libipt_ULOG.c
+++ b/extensions/libipt_ULOG.c
@@ -150,11 +150,6 @@ static int parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-/* Final check; nothing. */
-static void final_check(unsigned int flags)
-{
-}
-
/* Saves the union ipt_targinfo in parsable form to stdout. */
static void save(const void *ip,
const struct xt_entry_target *target)
@@ -200,7 +195,6 @@ static struct iptables_target ulog = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libipt_ah.c b/extensions/libipt_ah.c
index 4f0f23c..22a13d1 100644
--- a/extensions/libipt_ah.c
+++ b/extensions/libipt_ah.c
@@ -104,12 +104,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-/* Final check; we don't care. */
-static void
-final_check(unsigned int flags)
-{
-}
-
static void
print_spis(const char *name, u_int32_t min, u_int32_t max,
int invert)
@@ -175,7 +169,6 @@ static struct iptables_match ah = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libipt_icmp.c b/extensions/libipt_icmp.c
index 5be4f21..0c1fbe7 100644
--- a/extensions/libipt_icmp.c
+++ b/extensions/libipt_icmp.c
@@ -280,11 +280,6 @@ static void save(const void *ip, const struct xt_entry_match *match)
}
}
-/* Final check; we don't care. We can pass 0xFF to match any type */
-static void final_check(unsigned int flags)
-{
-}
-
static struct iptables_match icmp = {
.name = "icmp",
.version = IPTABLES_VERSION,
@@ -293,7 +288,6 @@ static struct iptables_match icmp = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libipt_unclean.c b/extensions/libipt_unclean.c
index 9f7712a..2916bc3 100644
--- a/extensions/libipt_unclean.c
+++ b/extensions/libipt_unclean.c
@@ -23,11 +23,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 0;
}
-/* Final check; must have specified --mac. */
-static void final_check(unsigned int flags)
-{
-}
-
static
struct iptables_match unclean = {
.name = "unclean",
@@ -36,7 +31,6 @@ struct iptables_match unclean = {
.userspacesize = IPT_ALIGN(0),
.help = &help,
.parse = &parse,
- .final_check = &final_check,
.print = NULL,
.save = NULL,
};
diff --git a/extensions/libxt_NFLOG.c b/extensions/libxt_NFLOG.c
index 0bbb8ce..11e47a4 100644
--- a/extensions/libxt_NFLOG.c
+++ b/extensions/libxt_NFLOG.c
@@ -110,11 +110,6 @@ static int parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-static void final_check(unsigned int flags)
-{
- return;
-}
-
static void nflog_print(const struct xt_nflog_info *info, char *prefix)
{
if (info->prefix[0] != '\0')
@@ -151,7 +146,6 @@ static struct xtables_target nflog = {
.help = help,
.init = init,
.parse = parse,
- .final_check = final_check,
.print = print,
.save = save,
.extra_opts = opts,
@@ -166,7 +160,6 @@ static struct xtables_target nflog6 = {
.help = help,
.init = init,
.parse = parse,
- .final_check = final_check,
.print = print,
.save = save,
.extra_opts = opts,
diff --git a/extensions/libxt_NFQUEUE.c b/extensions/libxt_NFQUEUE.c
index f023bbc..820d5a1 100644
--- a/extensions/libxt_NFQUEUE.c
+++ b/extensions/libxt_NFQUEUE.c
@@ -63,11 +63,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-static void
-final_check(unsigned int flags)
-{
-}
-
/* Prints out the targinfo. */
static void
print(const void *ip,
@@ -97,7 +92,6 @@ static struct xtables_target nfqueue = {
.userspacesize = XT_ALIGN(sizeof(struct xt_NFQ_info)),
.help = &help,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
@@ -111,7 +105,6 @@ static struct xtables_target nfqueue6 = {
.userspacesize = XT_ALIGN(sizeof(struct xt_NFQ_info)),
.help = &help,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libxt_NOTRACK.c b/extensions/libxt_NOTRACK.c
index 8e23753..3a01475 100644
--- a/extensions/libxt_NOTRACK.c
+++ b/extensions/libxt_NOTRACK.c
@@ -26,11 +26,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 0;
}
-static void
-final_check(unsigned int flags)
-{
-}
-
static
struct xtables_target notrack =
{
@@ -41,7 +36,6 @@ struct xtables_target notrack =
.userspacesize = XT_ALIGN(0),
.help = &help,
.parse = &parse,
- .final_check = &final_check,
};
static
@@ -54,7 +48,6 @@ struct xtables_target notrack6 =
.userspacesize = XT_ALIGN(0),
.help = &help,
.parse = &parse,
- .final_check = &final_check,
};
void _init(void)
diff --git a/extensions/libxt_TRACE.c b/extensions/libxt_TRACE.c
index afe5498..48015e5 100644
--- a/extensions/libxt_TRACE.c
+++ b/extensions/libxt_TRACE.c
@@ -26,11 +26,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 0;
}
-static void
-final_check(unsigned int flags)
-{
-}
-
static struct xtables_target trace = {
.family = AF_INET,
.name = "TRACE",
@@ -39,7 +34,6 @@ static struct xtables_target trace = {
.userspacesize = XT_ALIGN(0),
.help = &help,
.parse = &parse,
- .final_check = &final_check,
.print = NULL, /* print */
.save = NULL, /* save */
};
@@ -52,7 +46,6 @@ static struct xtables_target trace6 = {
.userspacesize = XT_ALIGN(0),
.help = &help,
.parse = &parse,
- .final_check = &final_check,
.print = NULL, /* print */
.save = NULL, /* save */
};
diff --git a/extensions/libxt_dccp.c b/extensions/libxt_dccp.c
index dcb199c..b6818cc 100644
--- a/extensions/libxt_dccp.c
+++ b/extensions/libxt_dccp.c
@@ -193,11 +193,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-static void
-final_check(unsigned int flags)
-{
-}
-
static char *
port_to_service(int port)
{
@@ -360,7 +355,6 @@ static struct xtables_match dccp =
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
@@ -376,7 +370,6 @@ static struct xtables_match dccp6 =
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libxt_esp.c b/extensions/libxt_esp.c
index adeeec7..6faaba6 100644
--- a/extensions/libxt_esp.c
+++ b/extensions/libxt_esp.c
@@ -107,12 +107,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-/* Final check; we don't care. */
-static void
-final_check(unsigned int flags)
-{
-}
-
static void
print_spis(const char *name, u_int32_t min, u_int32_t max,
int invert)
@@ -172,7 +166,6 @@ static struct xtables_match esp = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
@@ -187,7 +180,6 @@ static struct xtables_match esp6 = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libxt_limit.c b/extensions/libxt_limit.c
index e9c89c3..13468eb 100644
--- a/extensions/libxt_limit.c
+++ b/extensions/libxt_limit.c
@@ -126,11 +126,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-/* Final check; nothing. */
-static void final_check(unsigned int flags)
-{
-}
-
static struct rates
{
const char *name;
@@ -183,7 +178,6 @@ static struct xtables_match limit = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
@@ -198,7 +192,6 @@ static struct xtables_match limit6 = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libxt_quota.c b/extensions/libxt_quota.c
index 12a3371..0e04d20 100644
--- a/extensions/libxt_quota.c
+++ b/extensions/libxt_quota.c
@@ -79,12 +79,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-/* no final check */
-static void
-final_check(unsigned int flags)
-{
-}
-
struct xtables_match quota = {
.family = AF_INET,
.name = "quota",
@@ -93,7 +87,6 @@ struct xtables_match quota = {
.userspacesize = offsetof(struct xt_quota_info, quota),
.help = &help,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
@@ -107,7 +100,6 @@ struct xtables_match quota6 = {
.userspacesize = offsetof(struct xt_quota_info, quota),
.help = &help,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libxt_sctp.c b/extensions/libxt_sctp.c
index c816b99..2768ca5 100644
--- a/extensions/libxt_sctp.c
+++ b/extensions/libxt_sctp.c
@@ -317,11 +317,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-static void
-final_check(unsigned int flags)
-{
-}
-
static char *
port_to_service(int port)
{
@@ -534,7 +529,6 @@ static struct xtables_match sctp = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
@@ -549,7 +543,6 @@ static struct xtables_match sctp6 = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/extensions/libxt_standard.c b/extensions/libxt_standard.c
index 48ba85a..078f9ca 100644
--- a/extensions/libxt_standard.c
+++ b/extensions/libxt_standard.c
@@ -26,11 +26,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 0;
}
-/* Final check; don't care. */
-static void final_check(unsigned int flags)
-{
-}
-
/* Saves the targinfo in parsable form to stdout. */
static void
save(const void *ip, const struct xt_entry_target *target)
@@ -46,7 +41,6 @@ struct xtables_target standard = {
.userspacesize = XT_ALIGN(sizeof(int)),
.help = &help,
.parse = &parse,
- .final_check = &final_check,
.print = NULL,
.save = &save,
};
@@ -60,7 +54,6 @@ struct xtables_target standard6 = {
.userspacesize = XT_ALIGN(sizeof(int)),
.help = &help,
.parse = &parse,
- .final_check = &final_check,
.print = NULL,
.save = &save,
};
diff --git a/extensions/libxt_tcp.c b/extensions/libxt_tcp.c
index 8c1b82c..6ab0e22 100644
--- a/extensions/libxt_tcp.c
+++ b/extensions/libxt_tcp.c
@@ -220,12 +220,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-/* Final check; we don't care. */
-static void
-final_check(unsigned int flags)
-{
-}
-
static char *
port_to_service(int port)
{
@@ -402,7 +396,6 @@ static struct xtables_match tcp = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts,
@@ -417,7 +410,6 @@ static struct xtables_match tcp6 = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts,
diff --git a/extensions/libxt_time.c b/extensions/libxt_time.c
index d380f63..a766f11 100644
--- a/extensions/libxt_time.c
+++ b/extensions/libxt_time.c
@@ -326,10 +326,6 @@ static int time_parse(int c, char **argv, int invert, unsigned int *flags,
return 0;
}
-static void time_check(unsigned int flags)
-{
-}
-
static void time_print_date(time_t date, const char *command)
{
struct tm *t;
@@ -476,7 +472,6 @@ static struct xtables_match time_reg = {
.help = time_help,
.init = time_init,
.parse = time_parse,
- .final_check = time_check,
.print = time_print,
.save = time_save,
.extra_opts = time_opts,
@@ -491,7 +486,6 @@ static struct xtables_match time6_reg = {
.help = time_help,
.init = time_init,
.parse = time_parse,
- .final_check = time_check,
.print = time_print,
.save = time_save,
.extra_opts = time_opts,
diff --git a/extensions/libxt_u32.c b/extensions/libxt_u32.c
index 71b555e..2be5c8b 100644
--- a/extensions/libxt_u32.c
+++ b/extensions/libxt_u32.c
@@ -247,10 +247,6 @@ static int u32_parse(int c, char **argv, int invert, unsigned int *flags,
}
}
-static void u32_check(unsigned int flags)
-{
-}
-
static void u32_print(const void *ip, const struct xt_entry_match *match,
int numeric)
{
@@ -280,7 +276,6 @@ static struct xtables_match u32_reg = {
.userspacesize = XT_ALIGN(sizeof(struct xt_u32)),
.help = u32_help,
.parse = u32_parse,
- .final_check = u32_check,
.print = u32_print,
.save = u32_save,
.extra_opts = u32_opts,
@@ -294,7 +289,6 @@ static struct xtables_match u32_reg6 = {
.userspacesize = XT_ALIGN(sizeof(struct xt_u32)),
.help = u32_help,
.parse = u32_parse,
- .final_check = u32_check,
.print = u32_print,
.save = u32_save,
.extra_opts = u32_opts,
diff --git a/extensions/libxt_udp.c b/extensions/libxt_udp.c
index 734a0a8..d9880ce 100644
--- a/extensions/libxt_udp.c
+++ b/extensions/libxt_udp.c
@@ -104,12 +104,6 @@ parse(int c, char **argv, int invert, unsigned int *flags,
return 1;
}
-/* Final check; we don't care. */
-static void
-final_check(unsigned int flags)
-{
-}
-
static char *
port_to_service(int port)
{
@@ -216,7 +210,6 @@ struct xtables_match udp = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
@@ -232,7 +225,6 @@ struct xtables_match udp6 = {
.help = &help,
.init = &init,
.parse = &parse,
- .final_check = &final_check,
.print = &print,
.save = &save,
.extra_opts = opts
diff --git a/ip6tables.c b/ip6tables.c
index 3a54c86..026a495 100644
--- a/ip6tables.c
+++ b/ip6tables.c
@@ -1840,9 +1840,10 @@ int do_command6(int argc, char *argv[], char **table, ip6tc_handle_t *handle)
}
for (matchp = matches; matchp; matchp = matchp->next)
- matchp->match->final_check(matchp->match->mflags);
+ if (matchp->match->final_check != NULL)
+ matchp->match->final_check(matchp->match->mflags);
- if (target)
+ if (target != NULL && target->final_check != NULL)
target->final_check(target->tflags);
/* Fix me: must put inverse options checking here --MN */
diff --git a/iptables.c b/iptables.c
index 900e8fc..d7a45ee 100644
--- a/iptables.c
+++ b/iptables.c
@@ -1905,9 +1905,10 @@ int do_command(int argc, char *argv[], char **table, iptc_handle_t *handle)
}
for (matchp = matches; matchp; matchp = matchp->next)
- matchp->match->final_check(matchp->match->mflags);
+ if (matchp->match->final_check != NULL)
+ matchp->match->final_check(matchp->match->mflags);
- if (target)
+ if (target != NULL && target->final_check != NULL)
target->final_check(target->tflags);
/* Fix me: must put inverse options checking here --MN */