ipt_dstlimit.c - locking & macros
Subsystems (2)
PATCH 1/1 ipt_dstlimit.c - locking & macros
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
Signature · 2 lines
Dennis Koslowski <[email protected]> | Product Development Astaro AG | http://www.astaro.com | +49-721-490069-0 | Fax -55
net/ipv4/netfilter/ipt_dstlimit.c renamed from net/ipv4/netfilter/ipt_dstlimit.c.orig +5 -3
@@ -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_dstlint 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_dstlatomic_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);