From b2d2ce07b7356b8597991986fe80fdf6bb465309 Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Wed, 4 Jun 2003 06:25:32 +0000 Subject: revert back to 2.5.70 --- kernel/linux2.5/net/bridge/netfilter/ebt_log.c | 35 +++++++++++--------------- 1 file changed, 15 insertions(+), 20 deletions(-) (limited to 'kernel/linux2.5/net/bridge/netfilter/ebt_log.c') 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) -- cgit v1.2.3