summaryrefslogtreecommitdiffstats
path: root/kernel/linux2.5/net/bridge/netfilter/ebt_log.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/linux2.5/net/bridge/netfilter/ebt_log.c')
-rw-r--r--kernel/linux2.5/net/bridge/netfilter/ebt_log.c35
1 files changed, 15 insertions, 20 deletions
diff --git a/kernel/linux2.5/net/bridge/netfilter/ebt_log.c b/kernel/linux2.5/net/bridge/netfilter/ebt_log.c
index 72dec1e..e7a3ef4 100644
--- a/kernel/linux2.5/net/bridge/netfilter/ebt_log.c
+++ b/kernel/linux2.5/net/bridge/netfilter/ebt_log.c
@@ -17,6 +17,21 @@
static spinlock_t ebt_log_lock = SPIN_LOCK_UNLOCKED;
+static int ebt_log_check(const char *tablename, unsigned int hookmask,
+ const struct ebt_entry *e, void *data, unsigned int datalen)
+{
+ struct ebt_log_info *info = (struct ebt_log_info *)data;
+
+ if (datalen != sizeof(struct ebt_log_info))
+ return -EINVAL;
+ if (info->bitmask & ~EBT_LOG_MASK)
+ return -EINVAL;
+ if (info->loglevel >= 8)
+ return -EINVAL;
+ info->prefix[EBT_LOG_PREFIX_SIZE - 1] = '\0';
+ return 0;
+}
+
struct tcpudphdr
{
uint16_t src;
@@ -120,32 +135,12 @@ out:
spin_unlock_bh(&ebt_log_lock);
}
-static struct ebt_watcher log;
-static int ebt_log_check(const char *tablename, unsigned int hookmask,
- const struct ebt_entry *e, void *data, unsigned int datalen,
- unsigned int version)
-{
- struct ebt_log_info *info = (struct ebt_log_info *)data;
-
- if (datalen != sizeof(struct ebt_log_info))
- return -EINVAL;
- if (ebt_check_version(version, log.version, log.name))
- return -EINVAL;
- if (info->bitmask & ~EBT_LOG_MASK)
- return -EINVAL;
- if (info->loglevel >= 8)
- return -EINVAL;
- info->prefix[EBT_LOG_PREFIX_SIZE - 1] = '\0';
- return 0;
-}
-
static struct ebt_watcher log =
{
.name = EBT_LOG_WATCHER,
.watcher = ebt_log,
.check = ebt_log_check,
.me = THIS_MODULE,
- .version = VERSIONIZE(1,0),
};
static int __init init(void)