Commit 7e030815 authored by Jamal Hadi Salim's avatar Jamal Hadi Salim Committed by David S. Miller

[NETFILTER]: ipt mutex locks access

Signed-off-by: default avatarHarald Welte <laforge@netfilter.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9f9dea7d
......@@ -413,6 +413,10 @@ extern void ipt_unregister_target(struct ipt_target *target);
extern int ipt_register_match(struct ipt_match *match);
extern void ipt_unregister_match(struct ipt_match *match);
extern struct ipt_target *
__ipt_find_target_lock(const char *name, int *error);
extern void __ipt_mutex_up(void);
/* Furniture shopping... */
struct ipt_table
{
......
......@@ -477,6 +477,18 @@ ipt_find_target_lock(const char *name, int *error, struct semaphore *mutex)
return find_inlist_lock(&ipt_target, name, "ipt_", error, mutex);
}
struct ipt_target *
__ipt_find_target_lock(const char *name, int *error)
{
return ipt_find_target_lock(name,error,&ipt_mutex);
}
void
__ipt_mutex_up(void)
{
up(&ipt_mutex);
}
/* All zeroes == unconditional rule. */
static inline int
unconditional(const struct ipt_ip *ip)
......@@ -1877,6 +1889,8 @@ EXPORT_SYMBOL(ipt_unregister_match);
EXPORT_SYMBOL(ipt_do_table);
EXPORT_SYMBOL(ipt_register_target);
EXPORT_SYMBOL(ipt_unregister_target);
EXPORT_SYMBOL_GPL(__ipt_find_target_lock);
EXPORT_SYMBOL_GPL(__ipt_mutex_up);
module_init(init);
module_exit(fini);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment