summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/types.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/types.c b/lib/types.c
index 402e726..c440993 100644
--- a/lib/types.c
+++ b/lib/types.c
@@ -267,6 +267,19 @@ create_type_get(struct ipset_session *session)
kmax, tmin);
}
+ /* Disable unsupported revisions */
+ for (match = NULL, t = typelist; t != NULL; t = t->next) {
+ /* Skip revisions which are unsupported by the kernel */
+ if (t->kernel_check == IPSET_KERNEL_MISMATCH)
+ continue;
+ if (ipset_match_typename(typename, t)
+ && MATCH_FAMILY(t, family)) {
+ if (t->revision < kmin || t->revision > kmax)
+ t->kernel_check = IPSET_KERNEL_MISMATCH;
+ else if (match == NULL)
+ match = t;
+ }
+ }
match->kernel_check = IPSET_KERNEL_OK;
found:
ipset_data_set(data, IPSET_OPT_TYPE, match);