* [PATCH] ipt_dstlimit.c - locking & macros
@ 2004-07-27 8:15 Dennis Koslowski
0 siblings, 0 replies; only message in thread
From: Dennis Koslowski @ 2004-07-27 8:15 UTC (permalink / raw)
To: netfilter-devel@lists.netfilter.org
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
Hello,
The dstlimit code will be not compiled with 2.4.26 because of outdated
locking variable. Here is a quick fix, I hope it will be usefull for
someone else.
Regards
--
Dennis Koslowski <dkoslowski@astaro.com> | Product Development
Astaro AG | http://www.astaro.com | +49-721-490069-0 | Fax -55
[-- Attachment #2: ipt_dstlimit.c.diff --]
[-- Type: text/x-patch, Size: 1103 bytes --]
--- linux-2.4.26/net/ipv4/netfilter/ipt_dstlimit.c.orig 2004-07-26 16:36:30.000000000 +0200
+++ linux-2.4.26/net/ipv4/netfilter/ipt_dstlimit.c 2004-07-27 09:56:18.000000000 +0200
@@ -83,7 +83,7 @@ struct ipt_dstlimit_htable {
struct dstlimit_cfg cfg; /* config */
/* used internally */
- spinlock_t lock; /* lock for list_head */
+ struct spinlock_debug lock; /* lock for list_head */
u_int32_t rnd; /* random seed for hash */
struct timer_list timer; /* timer for gc */
atomic_t count; /* number entries in table */
@@ -179,7 +179,8 @@ static int htable_create(struct ipt_dstl
int i;
unsigned int size;
struct ipt_dstlimit_htable *hinfo;
-
+ DECLARE_LOCK(lock_aux);
+
if (minfo->cfg.size)
size = minfo->cfg.size;
else {
@@ -213,7 +214,8 @@ static int htable_create(struct ipt_dstl
atomic_set(&hinfo->count, 0);
atomic_set(&hinfo->use, 1);
hinfo->rnd = 0;
- hinfo->lock = SPIN_LOCK_UNLOCKED;
+/* hinfo->lock = SPIN_LOCK_UNLOCKED; */
+ hinfo->lock = lock_aux;
hinfo->pde = create_proc_entry(minfo->name, 0, dstlimit_procdir);
if (!hinfo->pde) {
vfree(hinfo);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-07-27 8:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-27 8:15 [PATCH] ipt_dstlimit.c - locking & macros Dennis Koslowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.