aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2012-09-21 16:01:45 -0400
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2012-09-22 16:44:29 -0400
commit3ace95c0ac125a042cfb682d0a9bbdbf1e5a2c65 (patch)
treeec62e63a19cf4eac67ab6d32675d4cc4961aa76e
parent10111a6ef373c377e87730749a0f68210c3fd062 (diff)
netfilter: ipset: Coding style fixes
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
-rw-r--r--include/linux/netfilter/ipset/ip_set.h5
-rw-r--r--include/linux/netfilter/ipset/ip_set_ahash.h2
-rw-r--r--net/netfilter/ipset/ip_set_bitmap_ipmac.c4
-rw-r--r--net/netfilter/ipset/ip_set_core.c9
4 files changed, 12 insertions, 8 deletions
diff --git a/include/linux/netfilter/ipset/ip_set.h b/include/linux/netfilter/ipset/ip_set.h
index 1d954c6c4e08..0c1e97b3acfb 100644
--- a/include/linux/netfilter/ipset/ip_set.h
+++ b/include/linux/netfilter/ipset/ip_set.h
@@ -255,7 +255,7 @@ struct ip_set_type_variant {
255 * returns negative error code, 255 * returns negative error code,
256 * zero for no match/success to add/delete 256 * zero for no match/success to add/delete
257 * positive for matching element */ 257 * positive for matching element */
258 int (*kadt)(struct ip_set *set, const struct sk_buff * skb, 258 int (*kadt)(struct ip_set *set, const struct sk_buff *skb,
259 const struct xt_action_param *par, 259 const struct xt_action_param *par,
260 enum ipset_adt adt, const struct ip_set_adt_opt *opt); 260 enum ipset_adt adt, const struct ip_set_adt_opt *opt);
261 261
@@ -430,7 +430,8 @@ static inline int nla_put_ipaddr4(struct sk_buff *skb, int type, __be32 ipaddr)
430 return ret; 430 return ret;
431} 431}
432 432
433static inline int nla_put_ipaddr6(struct sk_buff *skb, int type, const struct in6_addr *ipaddrptr) 433static inline int nla_put_ipaddr6(struct sk_buff *skb, int type,
434 const struct in6_addr *ipaddrptr)
434{ 435{
435 struct nlattr *__nested = ipset_nest_start(skb, type); 436 struct nlattr *__nested = ipset_nest_start(skb, type);
436 int ret; 437 int ret;
diff --git a/include/linux/netfilter/ipset/ip_set_ahash.h b/include/linux/netfilter/ipset/ip_set_ahash.h
index 495acdf7251f..ef9acd3c8450 100644
--- a/include/linux/netfilter/ipset/ip_set_ahash.h
+++ b/include/linux/netfilter/ipset/ip_set_ahash.h
@@ -696,7 +696,7 @@ nla_put_failure:
696} 696}
697 697
698static int 698static int
699type_pf_kadt(struct ip_set *set, const struct sk_buff * skb, 699type_pf_kadt(struct ip_set *set, const struct sk_buff *skb,
700 const struct xt_action_param *par, 700 const struct xt_action_param *par,
701 enum ipset_adt adt, const struct ip_set_adt_opt *opt); 701 enum ipset_adt adt, const struct ip_set_adt_opt *opt);
702static int 702static int
diff --git a/net/netfilter/ipset/ip_set_bitmap_ipmac.c b/net/netfilter/ipset/ip_set_bitmap_ipmac.c
index 645c9d13c194..0f92dc24cb89 100644
--- a/net/netfilter/ipset/ip_set_bitmap_ipmac.c
+++ b/net/netfilter/ipset/ip_set_bitmap_ipmac.c
@@ -323,11 +323,11 @@ bitmap_ipmac_tlist(const struct ip_set *set,
323 (elem->match == MAC_FILLED && 323 (elem->match == MAC_FILLED &&
324 nla_put(skb, IPSET_ATTR_ETHER, ETH_ALEN, 324 nla_put(skb, IPSET_ATTR_ETHER, ETH_ALEN,
325 elem->ether))) 325 elem->ether)))
326 goto nla_put_failure; 326 goto nla_put_failure;
327 timeout = elem->match == MAC_UNSET ? elem->timeout 327 timeout = elem->match == MAC_UNSET ? elem->timeout
328 : ip_set_timeout_get(elem->timeout); 328 : ip_set_timeout_get(elem->timeout);
329 if (nla_put_net32(skb, IPSET_ATTR_TIMEOUT, htonl(timeout))) 329 if (nla_put_net32(skb, IPSET_ATTR_TIMEOUT, htonl(timeout)))
330 goto nla_put_failure; 330 goto nla_put_failure;
331 ipset_nest_end(skb, nested); 331 ipset_nest_end(skb, nested);
332 } 332 }
333 ipset_nest_end(skb, atd); 333 ipset_nest_end(skb, atd);
diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c
index ad39ef406851..72e9bf0ef90d 100644
--- a/net/netfilter/ipset/ip_set_core.c
+++ b/net/netfilter/ipset/ip_set_core.c
@@ -69,7 +69,8 @@ find_set_type(const char *name, u8 family, u8 revision)
69 69
70 list_for_each_entry_rcu(type, &ip_set_type_list, list) 70 list_for_each_entry_rcu(type, &ip_set_type_list, list)
71 if (STREQ(type->name, name) && 71 if (STREQ(type->name, name) &&
72 (type->family == family || type->family == NFPROTO_UNSPEC) && 72 (type->family == family ||
73 type->family == NFPROTO_UNSPEC) &&
73 revision >= type->revision_min && 74 revision >= type->revision_min &&
74 revision <= type->revision_max) 75 revision <= type->revision_max)
75 return type; 76 return type;
@@ -149,7 +150,8 @@ __find_set_type_minmax(const char *name, u8 family, u8 *min, u8 *max,
149 rcu_read_lock(); 150 rcu_read_lock();
150 list_for_each_entry_rcu(type, &ip_set_type_list, list) 151 list_for_each_entry_rcu(type, &ip_set_type_list, list)
151 if (STREQ(type->name, name) && 152 if (STREQ(type->name, name) &&
152 (type->family == family || type->family == NFPROTO_UNSPEC)) { 153 (type->family == family ||
154 type->family == NFPROTO_UNSPEC)) {
153 found = true; 155 found = true;
154 if (type->revision_min < *min) 156 if (type->revision_min < *min)
155 *min = type->revision_min; 157 *min = type->revision_min;
@@ -721,7 +723,8 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb,
721 * by the nfnl mutex. Find the first free index in ip_set_list 723 * by the nfnl mutex. Find the first free index in ip_set_list
722 * and check clashing. 724 * and check clashing.
723 */ 725 */
724 if ((ret = find_free_id(set->name, &index, &clash)) != 0) { 726 ret = find_free_id(set->name, &index, &clash);
727 if (ret != 0) {
725 /* If this is the same set and requested, ignore error */ 728 /* If this is the same set and requested, ignore error */
726 if (ret == -EEXIST && 729 if (ret == -EEXIST &&
727 (flags & IPSET_FLAG_EXIST) && 730 (flags & IPSET_FLAG_EXIST) &&