[netfilter-cvslog] r7482 - in trunk/iptables: . extensions
kaber at trash.net
kaber at trash.net
Mon Apr 14 08:56:58 CEST 2008
Author: kaber at trash.net
Date: 2008-04-14 08:56:58 +0200 (Mon, 14 Apr 2008)
New Revision: 7482
Modified:
trunk/iptables/extensions/libxt_CLASSIFY.c
trunk/iptables/extensions/libxt_MARK.c
trunk/iptables/extensions/libxt_RATEEST.c
trunk/iptables/extensions/libxt_SECMARK.c
trunk/iptables/extensions/libxt_TRACE.c
trunk/iptables/extensions/libxt_length.c
trunk/iptables/extensions/libxt_limit.c
trunk/iptables/extensions/libxt_mark.c
trunk/iptables/extensions/libxt_pkttype.c
trunk/iptables/extensions/libxt_quota.c
trunk/iptables/extensions/libxt_rateest.c
trunk/iptables/extensions/libxt_standard.c
trunk/iptables/extensions/libxt_statistic.c
trunk/iptables/extensions/libxt_string.c
trunk/iptables/extensions/libxt_time.c
trunk/iptables/extensions/libxt_u32.c
trunk/iptables/xtables.c
Log:
[PATCH 8/8] Implement AF_UNSPEC as a wildcard for extensions
Modified: trunk/iptables/extensions/libxt_CLASSIFY.c
===================================================================
--- trunk/iptables/extensions/libxt_CLASSIFY.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_CLASSIFY.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -103,7 +103,7 @@
}
static struct xtables_target classify_target = {
- .family = AF_INET,
+ .family = AF_UNSPEC,
.name = "CLASSIFY",
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_classify_target_info)),
@@ -116,22 +116,7 @@
.extra_opts = CLASSIFY_opts,
};
-static struct xtables_target classify_target6 = {
- .family = AF_INET6,
- .name = "CLASSIFY",
- .version = IPTABLES_VERSION,
- .size = XT_ALIGN(sizeof(struct xt_classify_target_info)),
- .userspacesize = XT_ALIGN(sizeof(struct xt_classify_target_info)),
- .help = CLASSIFY_help,
- .parse = CLASSIFY_parse,
- .final_check = CLASSIFY_final_check,
- .print = CLASSIFY_print,
- .save = CLASSIFY_save,
- .extra_opts = CLASSIFY_opts,
-};
-
void _init(void)
{
xtables_register_target(&classify_target);
- xtables_register_target(&classify_target6);
}
Modified: trunk/iptables/extensions/libxt_MARK.c
===================================================================
--- trunk/iptables/extensions/libxt_MARK.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_MARK.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -333,7 +333,7 @@
.version = IPTABLES_VERSION,
.name = "MARK",
.revision = 2,
- .family = AF_INET,
+ .family = AF_UNSPEC,
.size = XT_ALIGN(sizeof(struct xt_mark_tginfo2)),
.userspacesize = XT_ALIGN(sizeof(struct xt_mark_tginfo2)),
.help = mark_tg_help,
@@ -344,26 +344,10 @@
.extra_opts = mark_tg_opts,
};
-static struct xtables_target mark_tg6_reg_v2 = {
- .version = IPTABLES_VERSION,
- .name = "MARK",
- .revision = 2,
- .family = AF_INET6,
- .size = XT_ALIGN(sizeof(struct xt_mark_tginfo2)),
- .userspacesize = XT_ALIGN(sizeof(struct xt_mark_tginfo2)),
- .help = mark_tg_help,
- .parse = mark_tg_parse,
- .final_check = mark_tg_check,
- .print = mark_tg_print,
- .save = mark_tg_save,
- .extra_opts = mark_tg_opts,
-};
-
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);
- xtables_register_target(&mark_tg6_reg_v2);
}
Modified: trunk/iptables/extensions/libxt_RATEEST.c
===================================================================
--- trunk/iptables/extensions/libxt_RATEEST.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_RATEEST.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -202,8 +202,8 @@
__RATEEST_print(target, "--rateest-");
}
-static struct xtables_target rateest_target4 = {
- .family = AF_INET,
+static struct xtables_target rateest_tg_reg = {
+ .family = AF_UNSPEC,
.name = "RATEEST",
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_rateest_target_info)),
@@ -217,23 +217,7 @@
.extra_opts = RATEEST_opts,
};
-static struct xtables_target rateest_target6 = {
- .family = AF_INET6,
- .name = "RATEEST",
- .version = IPTABLES_VERSION,
- .size = XT_ALIGN(sizeof(struct xt_rateest_target_info)),
- .userspacesize = XT_ALIGN(sizeof(struct xt_rateest_target_info)),
- .help = RATEEST_help,
- .init = RATEEST_init,
- .parse = RATEEST_parse,
- .final_check = RATEEST_final_check,
- .print = RATEEST_print,
- .save = RATEEST_save,
- .extra_opts = RATEEST_opts,
-};
-
void _init(void)
{
- xtables_register_target(&rateest_target4);
- xtables_register_target(&rateest_target6);
+ xtables_register_target(&rateest_tg_reg);
}
Modified: trunk/iptables/extensions/libxt_SECMARK.c
===================================================================
--- trunk/iptables/extensions/libxt_SECMARK.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_SECMARK.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -100,7 +100,7 @@
}
static struct xtables_target secmark_target = {
- .family = AF_INET,
+ .family = AF_UNSPEC,
.name = "SECMARK",
.version = IPTABLES_VERSION,
.revision = 0,
@@ -114,23 +114,7 @@
.extra_opts = SECMARK_opts,
};
-static struct xtables_target secmark_target6 = {
- .family = AF_INET6,
- .name = "SECMARK",
- .version = IPTABLES_VERSION,
- .revision = 0,
- .size = XT_ALIGN(sizeof(struct xt_secmark_target_info)),
- .userspacesize = XT_ALIGN(sizeof(struct xt_secmark_target_info)),
- .help = SECMARK_help,
- .parse = SECMARK_parse,
- .final_check = SECMARK_check,
- .print = SECMARK_print,
- .save = SECMARK_save,
- .extra_opts = SECMARK_opts,
-};
-
void _init(void)
{
xtables_register_target(&secmark_target);
- xtables_register_target(&secmark_target6);
}
Modified: trunk/iptables/extensions/libxt_TRACE.c
===================================================================
--- trunk/iptables/extensions/libxt_TRACE.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_TRACE.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -24,7 +24,7 @@
}
static struct xtables_target trace_target = {
- .family = AF_INET,
+ .family = AF_UNSPEC,
.name = "TRACE",
.version = IPTABLES_VERSION,
.size = XT_ALIGN(0),
@@ -33,18 +33,7 @@
.parse = TRACE_parse,
};
-static struct xtables_target trace_target6 = {
- .family = AF_INET6,
- .name = "TRACE",
- .version = IPTABLES_VERSION,
- .size = XT_ALIGN(0),
- .userspacesize = XT_ALIGN(0),
- .help = TRACE_help,
- .parse = TRACE_parse,
-};
-
void _init(void)
{
xtables_register_target(&trace_target);
- xtables_register_target(&trace_target6);
}
Modified: trunk/iptables/extensions/libxt_length.c
===================================================================
--- trunk/iptables/extensions/libxt_length.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_length.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -125,7 +125,7 @@
}
static struct xtables_match length_match = {
- .family = AF_INET,
+ .family = AF_UNSPEC,
.name = "length",
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_length_info)),
@@ -138,22 +138,7 @@
.extra_opts = length_opts,
};
-static struct xtables_match length_match6 = {
- .family = AF_INET6,
- .name = "length",
- .version = IPTABLES_VERSION,
- .size = XT_ALIGN(sizeof(struct xt_length_info)),
- .userspacesize = XT_ALIGN(sizeof(struct xt_length_info)),
- .help = length_help,
- .parse = length_parse,
- .final_check = length_check,
- .print = length_print,
- .save = length_save,
- .extra_opts = length_opts,
-};
-
void _init(void)
{
xtables_register_match(&length_match);
- xtables_register_match(&length_match6);
}
Modified: trunk/iptables/extensions/libxt_limit.c
===================================================================
--- trunk/iptables/extensions/libxt_limit.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_limit.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -165,7 +165,7 @@
}
static struct xtables_match limit_match = {
- .family = AF_INET,
+ .family = AF_UNSPEC,
.name = "limit",
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_rateinfo)),
@@ -178,22 +178,7 @@
.extra_opts = limit_opts,
};
-static struct xtables_match limit_match6 = {
- .family = AF_INET6,
- .name = "limit",
- .version = IPTABLES_VERSION,
- .size = XT_ALIGN(sizeof(struct xt_rateinfo)),
- .userspacesize = offsetof(struct xt_rateinfo, prev),
- .help = limit_help,
- .init = limit_init,
- .parse = limit_parse,
- .print = limit_print,
- .save = limit_save,
- .extra_opts = limit_opts,
-};
-
void _init(void)
{
xtables_register_match(&limit_match);
- xtables_register_match(&limit_match6);
}
Modified: trunk/iptables/extensions/libxt_mark.c
===================================================================
--- trunk/iptables/extensions/libxt_mark.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_mark.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -149,7 +149,7 @@
}
static struct xtables_match mark_match = {
- .family = AF_INET,
+ .family = AF_UNSPEC,
.name = "mark",
.revision = 0,
.version = IPTABLES_VERSION,
@@ -163,26 +163,11 @@
.extra_opts = mark_mt_opts,
};
-static struct xtables_match mark_match6 = {
- .family = AF_INET6,
- .name = "mark",
- .revision = 0,
- .version = IPTABLES_VERSION,
- .size = XT_ALIGN(sizeof(struct xt_mark_info)),
- .userspacesize = XT_ALIGN(sizeof(struct xt_mark_info)),
- .help = mark_mt_help,
- .parse = mark_parse,
- .final_check = mark_mt_check,
- .print = mark_print,
- .save = mark_save,
- .extra_opts = mark_mt_opts,
-};
-
static struct xtables_match mark_mt_reg = {
.version = IPTABLES_VERSION,
.name = "mark",
.revision = 1,
- .family = AF_INET,
+ .family = AF_UNSPEC,
.size = XT_ALIGN(sizeof(struct xt_mark_mtinfo1)),
.userspacesize = XT_ALIGN(sizeof(struct xt_mark_mtinfo1)),
.help = mark_mt_help,
@@ -193,25 +178,8 @@
.extra_opts = mark_mt_opts,
};
-static struct xtables_match mark_mt6_reg = {
- .version = IPTABLES_VERSION,
- .name = "mark",
- .revision = 1,
- .family = AF_INET6,
- .size = XT_ALIGN(sizeof(struct xt_mark_mtinfo1)),
- .userspacesize = XT_ALIGN(sizeof(struct xt_mark_mtinfo1)),
- .help = mark_mt_help,
- .parse = mark_mt_parse,
- .final_check = mark_mt_check,
- .print = mark_mt_print,
- .save = mark_mt_save,
- .extra_opts = mark_mt_opts,
-};
-
void _init(void)
{
xtables_register_match(&mark_match);
- xtables_register_match(&mark_match6);
xtables_register_match(&mark_mt_reg);
- xtables_register_match(&mark_mt6_reg);
}
Modified: trunk/iptables/extensions/libxt_pkttype.c
===================================================================
--- trunk/iptables/extensions/libxt_pkttype.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_pkttype.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -147,7 +147,7 @@
}
static struct xtables_match pkttype_match = {
- .family = AF_INET,
+ .family = AF_UNSPEC,
.name = "pkttype",
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_pkttype_info)),
@@ -160,22 +160,7 @@
.extra_opts = pkttype_opts,
};
-static struct xtables_match pkttype_match6 = {
- .family = AF_INET6,
- .name = "pkttype",
- .version = IPTABLES_VERSION,
- .size = XT_ALIGN(sizeof(struct xt_pkttype_info)),
- .userspacesize = XT_ALIGN(sizeof(struct xt_pkttype_info)),
- .help = pkttype_help,
- .parse = pkttype_parse,
- .final_check = pkttype_check,
- .print = pkttype_print,
- .save = pkttype_save,
- .extra_opts = pkttype_opts,
-};
-
void _init(void)
{
xtables_register_match(&pkttype_match);
- xtables_register_match(&pkttype_match6);
}
Modified: trunk/iptables/extensions/libxt_quota.c
===================================================================
--- trunk/iptables/extensions/libxt_quota.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_quota.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -78,7 +78,7 @@
}
struct xtables_match quota_match = {
- .family = AF_INET,
+ .family = AF_UNSPEC,
.name = "quota",
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof (struct xt_quota_info)),
@@ -90,22 +90,8 @@
.extra_opts = quota_opts,
};
-struct xtables_match quota_match6 = {
- .family = AF_INET6,
- .name = "quota",
- .version = IPTABLES_VERSION,
- .size = XT_ALIGN(sizeof (struct xt_quota_info)),
- .userspacesize = offsetof(struct xt_quota_info, quota),
- .help = quota_help,
- .parse = quota_parse,
- .print = quota_print,
- .save = quota_save,
- .extra_opts = quota_opts,
-};
-
void
_init(void)
{
xtables_register_match("a_match);
- xtables_register_match("a_match6);
}
Modified: trunk/iptables/extensions/libxt_rateest.c
===================================================================
--- trunk/iptables/extensions/libxt_rateest.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_rateest.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -426,8 +426,8 @@
}
}
-static struct xtables_match rateest_match4 = {
- .family = AF_INET,
+static struct xtables_match rateest_mt_reg = {
+ .family = AF_UNSPEC,
.name = "rateest",
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_rateest_match_info)),
@@ -440,22 +440,7 @@
.extra_opts = rateest_opts,
};
-static struct xtables_match rateest_match6 = {
- .family = AF_INET6,
- .name = "rateest",
- .version = IPTABLES_VERSION,
- .size = XT_ALIGN(sizeof(struct xt_rateest_match_info)),
- .userspacesize = XT_ALIGN(offsetof(struct xt_rateest_match_info, est1)),
- .help = rateest_help,
- .parse = rateest_parse,
- .final_check = rateest_final_check,
- .print = rateest_print,
- .save = rateest_save,
- .extra_opts = rateest_opts,
-};
-
void _init(void)
{
- xtables_register_match(&rateest_match4);
- xtables_register_match(&rateest_match6);
+ xtables_register_match(&rateest_mt_reg);
}
Modified: trunk/iptables/extensions/libxt_standard.c
===================================================================
--- trunk/iptables/extensions/libxt_standard.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_standard.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -24,7 +24,7 @@
}
static struct xtables_target standard_target = {
- .family = AF_INET,
+ .family = AF_UNSPEC,
.name = "standard",
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof(int)),
@@ -33,18 +33,7 @@
.parse = standard_parse,
};
-static struct xtables_target standard_target6 = {
- .family = AF_INET6,
- .name = "standard",
- .version = IPTABLES_VERSION,
- .size = XT_ALIGN(sizeof(int)),
- .userspacesize = XT_ALIGN(sizeof(int)),
- .help = standard_help,
- .parse = standard_parse,
-};
-
void _init(void)
{
xtables_register_target(&standard_target);
- xtables_register_target(&standard_target6);
}
Modified: trunk/iptables/extensions/libxt_statistic.c
===================================================================
--- trunk/iptables/extensions/libxt_statistic.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_statistic.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -164,7 +164,7 @@
}
static struct xtables_match statistic_match = {
- .family = AF_INET,
+ .family = AF_UNSPEC,
.name = "statistic",
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_statistic_info)),
@@ -178,23 +178,7 @@
.extra_opts = statistic_opts,
};
-static struct xtables_match statistic_match6 = {
- .family = AF_INET6,
- .name = "statistic",
- .version = IPTABLES_VERSION,
- .size = XT_ALIGN(sizeof(struct xt_statistic_info)),
- .userspacesize = offsetof(struct xt_statistic_info, u.nth.count),
- .init = statistic_mt_init,
- .help = statistic_help,
- .parse = statistic_parse,
- .final_check = statistic_check,
- .print = statistic_print,
- .save = statistic_save,
- .extra_opts = statistic_opts,
-};
-
void _init(void)
{
xtables_register_match(&statistic_match);
- xtables_register_match(&statistic_match6);
}
Modified: trunk/iptables/extensions/libxt_string.c
===================================================================
--- trunk/iptables/extensions/libxt_string.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_string.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -327,7 +327,7 @@
static struct xtables_match string_match = {
.name = "string",
- .family = AF_INET,
+ .family = AF_UNSPEC,
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_string_info)),
.userspacesize = offsetof(struct xt_string_info, config),
@@ -340,24 +340,7 @@
.extra_opts = string_opts,
};
-
-static struct xtables_match string_match6 = {
- .name = "string",
- .family = AF_INET6,
- .version = IPTABLES_VERSION,
- .size = XT_ALIGN(sizeof(struct xt_string_info)),
- .userspacesize = offsetof(struct xt_string_info, config),
- .help = string_help,
- .init = string_init,
- .parse = string_parse,
- .final_check = string_check,
- .print = string_print,
- .save = string_save,
- .extra_opts = string_opts,
-};
-
void _init(void)
{
xtables_register_match(&string_match);
- xtables_register_match(&string_match6);
}
Modified: trunk/iptables/extensions/libxt_time.c
===================================================================
--- trunk/iptables/extensions/libxt_time.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_time.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -466,7 +466,7 @@
static struct xtables_match time_match = {
.name = "time",
- .family = AF_INET,
+ .family = AF_UNSPEC,
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_time_info)),
.userspacesize = XT_ALIGN(sizeof(struct xt_time_info)),
@@ -478,22 +478,7 @@
.extra_opts = time_opts,
};
-static struct xtables_match time_match6 = {
- .name = "time",
- .family = AF_INET6,
- .version = IPTABLES_VERSION,
- .size = XT_ALIGN(sizeof(struct xt_time_info)),
- .userspacesize = XT_ALIGN(sizeof(struct xt_time_info)),
- .help = time_help,
- .init = time_init,
- .parse = time_parse,
- .print = time_print,
- .save = time_save,
- .extra_opts = time_opts,
-};
-
void _init(void)
{
xtables_register_match(&time_match);
- xtables_register_match(&time_match6);
}
Modified: trunk/iptables/extensions/libxt_u32.c
===================================================================
--- trunk/iptables/extensions/libxt_u32.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/extensions/libxt_u32.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -272,7 +272,7 @@
static struct xtables_match u32_match = {
.name = "u32",
- .family = AF_INET,
+ .family = AF_UNSPEC,
.version = IPTABLES_VERSION,
.size = XT_ALIGN(sizeof(struct xt_u32)),
.userspacesize = XT_ALIGN(sizeof(struct xt_u32)),
@@ -283,22 +283,7 @@
.extra_opts = u32_opts,
};
-static struct xtables_match u32_match6 = {
- .name = "u32",
- .family = AF_INET6,
- .version = IPTABLES_VERSION,
- .size = XT_ALIGN(sizeof(struct xt_u32)),
- .userspacesize = XT_ALIGN(sizeof(struct xt_u32)),
- .help = u32_help,
- .parse = u32_parse,
- .print = u32_print,
- .save = u32_save,
- .extra_opts = u32_opts,
-};
-
void _init(void)
{
xtables_register_match(&u32_match);
- xtables_register_match(&u32_match6);
- return;
}
Modified: trunk/iptables/xtables.c
===================================================================
--- trunk/iptables/xtables.c 2008-04-14 06:54:55 UTC (rev 7481)
+++ trunk/iptables/xtables.c 2008-04-14 06:56:58 UTC (rev 7482)
@@ -557,12 +557,13 @@
}
/* ignore not interested match */
- if (me->family != afinfo.family)
+ if (me->family != afinfo.family && me->family != AF_UNSPEC)
return;
old = find_match(me->name, DURING_LOAD, NULL);
if (old) {
- if (old->revision == me->revision) {
+ if (old->revision == me->revision &&
+ old->family == me->family) {
fprintf(stderr,
"%s: match `%s' already registered.\n",
program_name, me->name);
@@ -574,10 +575,14 @@
&& old->revision > me->revision)
return;
- /* Replace if compatible. */
+ /* See if new match can be used. */
if (!compatible_match_revision(me->name, me->revision))
return;
+ /* Prefer !AF_UNSPEC over AF_UNSPEC for same revision. */
+ if (old->revision == me->revision && me->family == AF_UNSPEC)
+ return;
+
/* Delete old one. */
for (i = &xtables_matches; *i!=old; i = &(*i)->next);
*i = old->next;
@@ -623,14 +628,15 @@
}
/* ignore not interested target */
- if (me->family != afinfo.family)
+ if (me->family != afinfo.family && me->family != AF_UNSPEC)
return;
old = find_target(me->name, DURING_LOAD);
if (old) {
struct xtables_target **i;
- if (old->revision == me->revision) {
+ if (old->revision == me->revision &&
+ old->family == me->family) {
fprintf(stderr,
"%s: target `%s' already registered.\n",
program_name, me->name);
@@ -642,10 +648,14 @@
&& old->revision > me->revision)
return;
- /* Replace if compatible. */
+ /* See if new target can be used. */
if (!compatible_target_revision(me->name, me->revision))
return;
+ /* Prefer !AF_UNSPEC over AF_UNSPEC for same revision. */
+ if (old->revision == me->revision && me->family == AF_UNSPEC)
+ return;
+
/* Delete old one. */
for (i = &xtables_targets; *i!=old; i = &(*i)->next);
*i = old->next;
More information about the netfilter-cvslog
mailing list