netfilter: ipset: move function to ip_set_bitmap_ip.c.
One inline function in ip_set_bitmap.h is only called in ip_set_bitmap_ip.c: move it and remove inline function specifier. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Acked-by: Jozsef Kadlecsik <kadlec@netfilter.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
856391854c
commit
3fbd6c4513
|
@ -12,18 +12,4 @@ enum {
|
|||
IPSET_ADD_START_STORED_TIMEOUT,
|
||||
};
|
||||
|
||||
/* Common functions */
|
||||
|
||||
static inline u32
|
||||
range_to_mask(u32 from, u32 to, u8 *bits)
|
||||
{
|
||||
u32 mask = 0xFFFFFFFE;
|
||||
|
||||
*bits = 32;
|
||||
while (--(*bits) > 0 && mask && (to & mask) != from)
|
||||
mask <<= 1;
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
||||
#endif /* __IP_SET_BITMAP_H */
|
||||
|
|
|
@ -237,6 +237,18 @@ init_map_ip(struct ip_set *set, struct bitmap_ip *map,
|
|||
return true;
|
||||
}
|
||||
|
||||
static u32
|
||||
range_to_mask(u32 from, u32 to, u8 *bits)
|
||||
{
|
||||
u32 mask = 0xFFFFFFFE;
|
||||
|
||||
*bits = 32;
|
||||
while (--(*bits) > 0 && mask && (to & mask) != from)
|
||||
mask <<= 1;
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
||||
static int
|
||||
bitmap_ip_create(struct net *net, struct ip_set *set, struct nlattr *tb[],
|
||||
u32 flags)
|
||||
|
|
Loading…
Reference in New Issue