#endif
#define SMP_ALIGN(x) (((x) + SMP_CACHE_BYTES-1) & ~(SMP_CACHE_BYTES-1))
+static DECLARE_MUTEX(ip6t_mutex);
/* Must have mutex */
#define ASSERT_READ_LOCK(x) IP_NF_ASSERT(down_trylock(&ip6t_mutex) != 0)
return find_inlist_lock(&ip6t_match, name, "ip6t_", error, mutex);
}
-struct ip6t_target *
+static struct ip6t_target *
ip6t_find_target_lock(const char *name, int *error, struct semaphore *mutex)
{
return find_inlist_lock(&ip6t_target, name, "ip6t_", error, mutex);
return 0;
}
+static inline int print_target(const struct ip6t_target *t,
+ off_t start_offset, char *buffer, int length,
+ off_t *pos, unsigned int *count)
+{
+ if (t == &ip6t_standard_target || t == &ip6t_error_target)
+ return 0;
+ return print_name((char *)t, start_offset, buffer, length, pos, count);
+}
+
static int ip6t_get_tables(char *buffer, char **start, off_t offset, int length)
{
off_t pos = 0;
if (down_interruptible(&ip6t_mutex) != 0)
return 0;
- LIST_FIND(&ip6t_target, print_name, char *,
+ LIST_FIND(&ip6t_target, print_target, struct ip6t_target *,
offset, buffer, length, &pos, &count);
up(&ip6t_mutex);
EXPORT_SYMBOL(ip6t_register_table);
EXPORT_SYMBOL(ip6t_unregister_table);
EXPORT_SYMBOL(ip6t_do_table);
-EXPORT_SYMBOL(ip6t_find_target_lock);
EXPORT_SYMBOL(ip6t_register_match);
EXPORT_SYMBOL(ip6t_unregister_match);
EXPORT_SYMBOL(ip6t_register_target);