History

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.

Florian Westphal committed 12 years ago

Commit 00408871 parent af284ec1 file · +2 −2Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/netfilter/ipset/ip_set.h+2−2
@@ -83,13 +83,13 @@ enum { · 82 unmodified lines
8383 IPSET_ATTR_CADT_FLAGS, /* 8 */
8484 IPSET_ATTR_CADT_LINENO = IPSET_ATTR_LINENO, /* 9 */
8585 IPSET_ATTR_MARK, /* 10 */
86+ IPSET_ATTR_MARKMASK, /* 11 */
8687 /* Reserve empty slots */
8788 IPSET_ATTR_CADT_MAX = 16,
8889 /* Create-only specific attributes */
8990 IPSET_ATTR_GC,
9091 IPSET_ATTR_HASHSIZE,
9192 IPSET_ATTR_MAXELEM,
92− IPSET_ATTR_MARKMASK,
9393 IPSET_ATTR_NETMASK,
9494 IPSET_ATTR_PROBES,
9595 IPSET_ATTR_RESIZE,
@@ -139,7 +139,6 @@ enum ipset_errno { · 43 unmodified lines
139139 IPSET_ERR_EXIST,
140140 IPSET_ERR_INVALID_CIDR,
141141 IPSET_ERR_INVALID_NETMASK,
142− IPSET_ERR_INVALID_MARKMASK,
143142 IPSET_ERR_INVALID_FAMILY,
144143 IPSET_ERR_TIMEOUT,
145144 IPSET_ERR_REFERENCED,
@@ -147,6 +146,7 @@ enum ipset_errno { · 1 unmodified line
147146 IPSET_ERR_IPADDR_IPV6,
148147 IPSET_ERR_COUNTER,
149148 IPSET_ERR_COMMENT,
149+ IPSET_ERR_INVALID_MARKMASK,
150150
151151 /* Type specific error codes */
152152 IPSET_ERR_TYPE_SPECIFIC = 4352,