diff options
author | Florian Westphal <fw@strlen.de> | 2014-02-13 06:40:59 -0500 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2014-03-06 03:31:42 -0500 |
commit | 004088768b78f69002f03a341597217eb608fb2c (patch) | |
tree | 325a21adf2a91a8804a75fccc5b5f6b9eaaeac10 | |
parent | af284ece87365f3a69723f5bcc1bcdb505b5eb5d (diff) |
netfilter: ipset: kernel: uapi: fix MARKMASK attr ABI breakage
commit 2dfb973c0dcc6d2211 (add markmask for hash:ip,mark data type)
inserted IPSET_ATTR_MARKMASK in-between other enum values, i.e.
changing values of all further attributes. This causes 'ipset list'
segfault on existing kernels since ipset no longer finds
IPSET_ATTR_MEMSIZE (it has a different value on kernel side).
Jozsef points out it should be moved below IPSET_ATTR_MARK which
works since there is some extra reserved space after that value.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
-rw-r--r-- | include/uapi/linux/netfilter/ipset/ip_set.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/uapi/linux/netfilter/ipset/ip_set.h b/include/uapi/linux/netfilter/ipset/ip_set.h index a29a378701d2..a1ca24408206 100644 --- a/include/uapi/linux/netfilter/ipset/ip_set.h +++ b/include/uapi/linux/netfilter/ipset/ip_set.h | |||
@@ -83,13 +83,13 @@ enum { | |||
83 | IPSET_ATTR_CADT_FLAGS, /* 8 */ | 83 | IPSET_ATTR_CADT_FLAGS, /* 8 */ |
84 | IPSET_ATTR_CADT_LINENO = IPSET_ATTR_LINENO, /* 9 */ | 84 | IPSET_ATTR_CADT_LINENO = IPSET_ATTR_LINENO, /* 9 */ |
85 | IPSET_ATTR_MARK, /* 10 */ | 85 | IPSET_ATTR_MARK, /* 10 */ |
86 | IPSET_ATTR_MARKMASK, /* 11 */ | ||
86 | /* Reserve empty slots */ | 87 | /* Reserve empty slots */ |
87 | IPSET_ATTR_CADT_MAX = 16, | 88 | IPSET_ATTR_CADT_MAX = 16, |
88 | /* Create-only specific attributes */ | 89 | /* Create-only specific attributes */ |
89 | IPSET_ATTR_GC, | 90 | IPSET_ATTR_GC, |
90 | IPSET_ATTR_HASHSIZE, | 91 | IPSET_ATTR_HASHSIZE, |
91 | IPSET_ATTR_MAXELEM, | 92 | IPSET_ATTR_MAXELEM, |
92 | IPSET_ATTR_MARKMASK, | ||
93 | IPSET_ATTR_NETMASK, | 93 | IPSET_ATTR_NETMASK, |
94 | IPSET_ATTR_PROBES, | 94 | IPSET_ATTR_PROBES, |
95 | IPSET_ATTR_RESIZE, | 95 | IPSET_ATTR_RESIZE, |
@@ -139,7 +139,6 @@ enum ipset_errno { | |||
139 | IPSET_ERR_EXIST, | 139 | IPSET_ERR_EXIST, |
140 | IPSET_ERR_INVALID_CIDR, | 140 | IPSET_ERR_INVALID_CIDR, |
141 | IPSET_ERR_INVALID_NETMASK, | 141 | IPSET_ERR_INVALID_NETMASK, |
142 | IPSET_ERR_INVALID_MARKMASK, | ||
143 | IPSET_ERR_INVALID_FAMILY, | 142 | IPSET_ERR_INVALID_FAMILY, |
144 | IPSET_ERR_TIMEOUT, | 143 | IPSET_ERR_TIMEOUT, |
145 | IPSET_ERR_REFERENCED, | 144 | IPSET_ERR_REFERENCED, |
@@ -147,6 +146,7 @@ enum ipset_errno { | |||
147 | IPSET_ERR_IPADDR_IPV6, | 146 | IPSET_ERR_IPADDR_IPV6, |
148 | IPSET_ERR_COUNTER, | 147 | IPSET_ERR_COUNTER, |
149 | IPSET_ERR_COMMENT, | 148 | IPSET_ERR_COMMENT, |
149 | IPSET_ERR_INVALID_MARKMASK, | ||
150 | 150 | ||
151 | /* Type specific error codes */ | 151 | /* Type specific error codes */ |
152 | IPSET_ERR_TYPE_SPECIFIC = 4352, | 152 | IPSET_ERR_TYPE_SPECIFIC = 4352, |