From cffe9a53f6bacb0c72d83efa19b1a9764d44dc72 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Tue, 21 Dec 2010 20:47:08 +0100 Subject: Kernel version compatibility: support from 2.6.34 The basic kernel compatibility issues are verified back to 2.6.24. The minimal supported kernel version had to be bumped from 2.6.31 to 2.6.34. --- kernel/ip_set.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'kernel/ip_set.c') diff --git a/kernel/ip_set.c b/kernel/ip_set.c index e890bf8..6d353d9 100644 --- a/kernel/ip_set.c +++ b/kernel/ip_set.c @@ -707,7 +707,7 @@ EXPORT_SYMBOL_GPL(ip_set_nfnl_put); */ 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; @@ -811,8 +811,8 @@ load_type_module(const char *typename) 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; @@ -950,8 +950,8 @@ ip_set_destroy_set(ip_set_id_t index) 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; @@ -995,8 +995,8 @@ ip_set_flush_set(struct ip_set *set) 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; @@ -1031,8 +1031,8 @@ ip_set_setname2_policy[IPSET_ATTR_CMD_MAX + 1] = { 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; @@ -1071,8 +1071,8 @@ ip_set_rename(struct sock *ctnl, struct sk_buff *skb, 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; @@ -1292,8 +1292,8 @@ out: 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; @@ -1316,7 +1316,7 @@ static const struct nla_policy ip_set_adt_policy[IPSET_ATTR_CMD_MAX + 1] = { 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) { @@ -1348,8 +1348,8 @@ call_ad(struct sock *ctnl, struct sk_buff *skb, 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; @@ -1392,8 +1392,8 @@ ip_set_uadd(struct sock *ctnl, struct sk_buff *skb, 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; @@ -1436,8 +1436,8 @@ ip_set_udel(struct sock *ctnl, struct sk_buff *skb, 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; @@ -1469,8 +1469,8 @@ ip_set_utest(struct sock *ctnl, struct sk_buff *skb, 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; @@ -1526,8 +1526,8 @@ static const struct nla_policy ip_set_type_policy[IPSET_ATTR_CMD_MAX + 1] = { 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; @@ -1590,8 +1590,8 @@ ip_set_protocol_policy[IPSET_ATTR_CMD_MAX + 1] = { 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; -- cgit v1.2.3