netfilter: ipset: whitespace and coding fixes detected by checkpatch.pl
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
committed by
Patrick McHardy
parent
e385357a2f
commit
15b4d93f03
@@ -331,7 +331,7 @@ struct ip_set {
|
|||||||
/* register and unregister set references */
|
/* register and unregister set references */
|
||||||
extern ip_set_id_t ip_set_get_byname(const char *name, struct ip_set **set);
|
extern ip_set_id_t ip_set_get_byname(const char *name, struct ip_set **set);
|
||||||
extern void ip_set_put_byindex(ip_set_id_t index);
|
extern void ip_set_put_byindex(ip_set_id_t index);
|
||||||
extern const char * ip_set_name_byindex(ip_set_id_t index);
|
extern const char *ip_set_name_byindex(ip_set_id_t index);
|
||||||
extern ip_set_id_t ip_set_nfnl_get(const char *name);
|
extern ip_set_id_t ip_set_nfnl_get(const char *name);
|
||||||
extern ip_set_id_t ip_set_nfnl_get_byindex(ip_set_id_t index);
|
extern ip_set_id_t ip_set_nfnl_get_byindex(ip_set_id_t index);
|
||||||
extern void ip_set_nfnl_put(ip_set_id_t index);
|
extern void ip_set_nfnl_put(ip_set_id_t index);
|
||||||
@@ -349,7 +349,7 @@ extern int ip_set_test(ip_set_id_t id, const struct sk_buff *skb,
|
|||||||
const struct ip_set_adt_opt *opt);
|
const struct ip_set_adt_opt *opt);
|
||||||
|
|
||||||
/* Utility functions */
|
/* Utility functions */
|
||||||
extern void * ip_set_alloc(size_t size);
|
extern void *ip_set_alloc(size_t size);
|
||||||
extern void ip_set_free(void *members);
|
extern void ip_set_free(void *members);
|
||||||
extern int ip_set_get_ipaddr4(struct nlattr *nla, __be32 *ipaddr);
|
extern int ip_set_get_ipaddr4(struct nlattr *nla, __be32 *ipaddr);
|
||||||
extern int ip_set_get_ipaddr6(struct nlattr *nla, union nf_inet_addr *ipaddr);
|
extern int ip_set_get_ipaddr6(struct nlattr *nla, union nf_inet_addr *ipaddr);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ struct htable {
|
|||||||
struct hbucket bucket[0]; /* hashtable buckets */
|
struct hbucket bucket[0]; /* hashtable buckets */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define hbucket(h, i) &((h)->bucket[i])
|
#define hbucket(h, i) (&((h)->bucket[i]))
|
||||||
|
|
||||||
/* Book-keeping of the prefixes added to the set */
|
/* Book-keeping of the prefixes added to the set */
|
||||||
struct ip_set_hash_nets {
|
struct ip_set_hash_nets {
|
||||||
|
|||||||
@@ -635,7 +635,8 @@ static struct ip_set_type bitmap_ipmac_type = {
|
|||||||
},
|
},
|
||||||
.adt_policy = {
|
.adt_policy = {
|
||||||
[IPSET_ATTR_IP] = { .type = NLA_NESTED },
|
[IPSET_ATTR_IP] = { .type = NLA_NESTED },
|
||||||
[IPSET_ATTR_ETHER] = { .type = NLA_BINARY, .len = ETH_ALEN },
|
[IPSET_ATTR_ETHER] = { .type = NLA_BINARY,
|
||||||
|
.len = ETH_ALEN },
|
||||||
[IPSET_ATTR_TIMEOUT] = { .type = NLA_U32 },
|
[IPSET_ATTR_TIMEOUT] = { .type = NLA_U32 },
|
||||||
[IPSET_ATTR_LINENO] = { .type = NLA_U32 },
|
[IPSET_ATTR_LINENO] = { .type = NLA_U32 },
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -683,8 +683,8 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb,
|
|||||||
if (attr[IPSET_ATTR_DATA] &&
|
if (attr[IPSET_ATTR_DATA] &&
|
||||||
nla_parse_nested(tb, IPSET_ATTR_CREATE_MAX, attr[IPSET_ATTR_DATA],
|
nla_parse_nested(tb, IPSET_ATTR_CREATE_MAX, attr[IPSET_ATTR_DATA],
|
||||||
set->type->create_policy)) {
|
set->type->create_policy)) {
|
||||||
ret = -IPSET_ERR_PROTOCOL;
|
ret = -IPSET_ERR_PROTOCOL;
|
||||||
goto put_out;
|
goto put_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = set->type->create(set, tb, flags);
|
ret = set->type->create(set, tb, flags);
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ hash_netiface4_kadt(struct ip_set *set, const struct sk_buff *skb,
|
|||||||
|
|
||||||
if (!nf_bridge)
|
if (!nf_bridge)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
data.iface = SRCDIR ? PHYSDEV(physindev): PHYSDEV(physoutdev);
|
data.iface = SRCDIR ? PHYSDEV(physindev) : PHYSDEV(physoutdev);
|
||||||
data.physdev = 1;
|
data.physdev = 1;
|
||||||
#else
|
#else
|
||||||
data.iface = NULL;
|
data.iface = NULL;
|
||||||
@@ -372,8 +372,8 @@ hash_netiface4_uadt(struct ip_set *set, struct nlattr *tb[],
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (tb[IPSET_ATTR_CADT_FLAGS]) {
|
if (tb[IPSET_ATTR_CADT_FLAGS]) {
|
||||||
u32 flags = ip_set_get_h32(tb[IPSET_ATTR_CADT_FLAGS]);
|
u32 cadt_flags = ip_set_get_h32(tb[IPSET_ATTR_CADT_FLAGS]);
|
||||||
if (flags & IPSET_FLAG_PHYSDEV)
|
if (cadt_flags & IPSET_FLAG_PHYSDEV)
|
||||||
data.physdev = 1;
|
data.physdev = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -562,7 +562,7 @@ hash_netiface6_kadt(struct ip_set *set, const struct sk_buff *skb,
|
|||||||
|
|
||||||
if (!nf_bridge)
|
if (!nf_bridge)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
data.iface = SRCDIR ? PHYSDEV(physindev): PHYSDEV(physoutdev);
|
data.iface = SRCDIR ? PHYSDEV(physindev) : PHYSDEV(physoutdev);
|
||||||
data.physdev = 1;
|
data.physdev = 1;
|
||||||
#else
|
#else
|
||||||
data.iface = NULL;
|
data.iface = NULL;
|
||||||
@@ -636,8 +636,8 @@ hash_netiface6_uadt(struct ip_set *set, struct nlattr *tb[],
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (tb[IPSET_ATTR_CADT_FLAGS]) {
|
if (tb[IPSET_ATTR_CADT_FLAGS]) {
|
||||||
u32 flags = ip_set_get_h32(tb[IPSET_ATTR_CADT_FLAGS]);
|
u32 cadt_flags = ip_set_get_h32(tb[IPSET_ATTR_CADT_FLAGS]);
|
||||||
if (flags & IPSET_FLAG_PHYSDEV)
|
if (cadt_flags & IPSET_FLAG_PHYSDEV)
|
||||||
data.physdev = 1;
|
data.physdev = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ const union nf_inet_addr ip_set_netmask_map[] = {
|
|||||||
EXPORT_SYMBOL_GPL(ip_set_netmask_map);
|
EXPORT_SYMBOL_GPL(ip_set_netmask_map);
|
||||||
|
|
||||||
#undef E
|
#undef E
|
||||||
#define E(a, b, c, d) \
|
#define E(a, b, c, d) \
|
||||||
{.ip6 = { (__force __be32) a, (__force __be32) b, \
|
{.ip6 = { (__force __be32) a, (__force __be32) b, \
|
||||||
(__force __be32) c, (__force __be32) d, \
|
(__force __be32) c, (__force __be32) d, \
|
||||||
} }
|
} }
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ match_set(ip_set_id_t index, const struct sk_buff *skb,
|
|||||||
return inv;
|
return inv;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ADT_OPT(n, f, d, fs, cfs, t) \
|
#define ADT_OPT(n, f, d, fs, cfs, t) \
|
||||||
const struct ip_set_adt_opt n = { \
|
const struct ip_set_adt_opt n = { \
|
||||||
.family = f, \
|
.family = f, \
|
||||||
.dim = d, \
|
.dim = d, \
|
||||||
|
|||||||
Reference in New Issue
Block a user