summaryrefslogtreecommitdiffstats
path: root/lib/types.c
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-03-19 11:13:20 +0100
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-03-19 11:13:20 +0100
commit9d001ebc259d84a91321b0c339e55e5b0557ef1b (patch)
treed104dd2dbea2b8596166674b438c5b97c1969d1e /lib/types.c
parentf284b0d07b5d99e745312cbcc0fd95a6a4a7f5b4 (diff)
Fix revision reporting
Revision reporting got broken by the revision checking patch, fixed.
Diffstat (limited to 'lib/types.c')
-rw-r--r--lib/types.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/types.c b/lib/types.c
index f0dbbc9..402e726 100644
--- a/lib/types.c
+++ b/lib/types.c
@@ -216,7 +216,7 @@ create_type_get(struct ipset_session *session)
&& MATCH_FAMILY(t, family)) {
if (match == NULL) {
match = t;
- tmax = t->revision;
+ tmin = tmax = t->revision;
} else if (t->family == match->family)
tmin = t->revision;
}
@@ -240,11 +240,10 @@ create_type_get(struct ipset_session *session)
if (ret != 0)
return NULL;
- kmax = *(const uint8_t *)ipset_data_get(data, IPSET_OPT_REVISION);
+ kmin = kmax = *(const uint8_t *)ipset_data_get(data, IPSET_OPT_REVISION);
if (ipset_data_test(data, IPSET_OPT_REVISION_MIN))
kmin = *(const uint8_t *)ipset_data_get(data, IPSET_OPT_REVISION_MIN);
- else
- kmin = kmax;
+
if (MAX(tmin, kmin) > MIN(tmax, kmax)) {
if (kmin > tmax)
return ipset_errptr(session,