*/
static inline bool
-protocol_failed(NFNL_CB_CONST struct nlattr * NFNL_CB_CONST tb[])
+protocol_failed(const struct nlattr * const tb[])
{
return !tb[IPSET_ATTR_PROTOCOL]
|| nla_get_u8(tb[IPSET_ATTR_PROTOCOL]) != IPSET_PROTOCOL;
static int
ip_set_create(struct sock *ctnl, struct sk_buff *skb,
- NFNL_CB_CONST struct nlmsghdr *nlh,
- NFNL_CB_CONST struct nlattr * NFNL_CB_CONST attr[])
+ const struct nlmsghdr *nlh,
+ const struct nlattr * const attr[])
{
struct ip_set *set, *clash;
ip_set_id_t index = IPSET_INVALID_ID;
static int
ip_set_destroy(struct sock *ctnl, struct sk_buff *skb,
- NFNL_CB_CONST struct nlmsghdr *nlh,
- NFNL_CB_CONST struct nlattr * NFNL_CB_CONST attr[])
+ const struct nlmsghdr *nlh,
+ const struct nlattr * const attr[])
{
ip_set_id_t i;
static int
ip_set_flush(struct sock *ctnl, struct sk_buff *skb,
- NFNL_CB_CONST struct nlmsghdr *nlh,
- NFNL_CB_CONST struct nlattr * NFNL_CB_CONST attr[])
+ const struct nlmsghdr *nlh,
+ const struct nlattr * const attr[])
{
ip_set_id_t i;
static int
ip_set_rename(struct sock *ctnl, struct sk_buff *skb,
- NFNL_CB_CONST struct nlmsghdr *nlh,
- NFNL_CB_CONST struct nlattr * NFNL_CB_CONST attr[])
+ const struct nlmsghdr *nlh,
+ const struct nlattr * const attr[])
{
struct ip_set *set;
const char *name2;
static int
ip_set_swap(struct sock *ctnl, struct sk_buff *skb,
- NFNL_CB_CONST struct nlmsghdr *nlh,
- NFNL_CB_CONST struct nlattr * NFNL_CB_CONST attr[])
+ const struct nlmsghdr *nlh,
+ const struct nlattr * const attr[])
{
struct ip_set *from, *to;
ip_set_id_t from_id, to_id;
static int
ip_set_dump(struct sock *ctnl, struct sk_buff *skb,
- NFNL_CB_CONST struct nlmsghdr *nlh,
- NFNL_CB_CONST struct nlattr * NFNL_CB_CONST attr[])
+ const struct nlmsghdr *nlh,
+ const struct nlattr * const attr[])
{
if (unlikely(protocol_failed(attr)))
return -IPSET_ERR_PROTOCOL;
static int
call_ad(struct sock *ctnl, struct sk_buff *skb,
- NFNL_CB_CONST struct nlattr * NFNL_CB_CONST attr[],
+ const struct nlattr * const attr[],
struct ip_set *set, const struct nlattr *nla,
enum ipset_adt adt, u32 flags)
{
static int
ip_set_uadd(struct sock *ctnl, struct sk_buff *skb,
- NFNL_CB_CONST struct nlmsghdr *nlh,
- NFNL_CB_CONST struct nlattr * NFNL_CB_CONST attr[])
+ const struct nlmsghdr *nlh,
+ const struct nlattr * const attr[])
{
struct ip_set *set;
const struct nlattr *nla;
static int
ip_set_udel(struct sock *ctnl, struct sk_buff *skb,
- NFNL_CB_CONST struct nlmsghdr *nlh,
- NFNL_CB_CONST struct nlattr * NFNL_CB_CONST attr[])
+ const struct nlmsghdr *nlh,
+ const struct nlattr * const attr[])
{
struct ip_set *set;
const struct nlattr *nla;
static int
ip_set_utest(struct sock *ctnl, struct sk_buff *skb,
- NFNL_CB_CONST struct nlmsghdr *nlh,
- NFNL_CB_CONST struct nlattr * NFNL_CB_CONST attr[])
+ const struct nlmsghdr *nlh,
+ const struct nlattr * const attr[])
{
struct ip_set *set;
int ret = 0;
static int
ip_set_header(struct sock *ctnl, struct sk_buff *skb,
- NFNL_CB_CONST struct nlmsghdr *nlh,
- NFNL_CB_CONST struct nlattr * NFNL_CB_CONST attr[])
+ const struct nlmsghdr *nlh,
+ const struct nlattr * const attr[])
{
const struct ip_set *set;
struct sk_buff *skb2;
static int
ip_set_type(struct sock *ctnl, struct sk_buff *skb,
- NFNL_CB_CONST struct nlmsghdr *nlh,
- NFNL_CB_CONST struct nlattr * NFNL_CB_CONST attr[])
+ const struct nlmsghdr *nlh,
+ const struct nlattr * const attr[])
{
struct sk_buff *skb2;
struct nlmsghdr *nlh2;
static int
ip_set_protocol(struct sock *ctnl, struct sk_buff *skb,
- NFNL_CB_CONST struct nlmsghdr *nlh,
- NFNL_CB_CONST struct nlattr * NFNL_CB_CONST attr[])
+ const struct nlmsghdr *nlh,
+ const struct nlattr * const attr[])
{
struct sk_buff *skb2;
struct nlmsghdr *nlh2;
/* Revision 0 interface: backward compatible with netfilter/iptables */
-/* Backward compatibility constrains:
+/* Backward compatibility constrains (incomplete):
* 2.6.24: [NETLINK]: Introduce nested and byteorder flag to netlink attribute
+ * 2.6.25: is_vmalloc_addr(): Check if an address is within the vmalloc
+ * boundaries
+ * 2.6.27: rcu: split list.h and move rcu-protected lists into rculist.h
+ * 2.6.28: netfilter: ctnetlink: remove bogus module dependency between
+ * ctnetlink and nf_nat (nfnl_lock/nfnl_unlock)
+ * 2.6.29: generic swap(): introduce global macro swap(a, b)
* 2.6.31: netfilter: passive OS fingerprint xtables match
+ * 2.6.34: rcu: Add lockdep-enabled variants of rcu_dereference()
*/
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
-#error "Linux kernel version too old: must be >= 2.6.31"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
+#error "Linux kernel version too old: must be >= 2.6.35"
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
static void
set_match_v0_destroy(const struct xt_mtdtor_param *par)
{
- struct xt_set_info_match *info = par->matchinfo;
+ struct xt_set_info_match_v0 *info = par->matchinfo;
ip_set_nfnl_put(info->match_set.index);
}