All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipt_hashlimit.c, inline patches broken.
@ 2005-01-27  4:13 Samuel Jean
  0 siblings, 0 replies; only message in thread
From: Samuel Jean @ 2005-01-27  4:13 UTC (permalink / raw)
  To: Harald Welte; +Cc: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 108 bytes --]

Hi Harald,

Sorry, looks like my mailer puts trailing spaces.
Here's both patch attached.

Regards,

Samuel

[-- Attachment #2: ipt_hashlimit.c-cantsleep.patch --]
[-- Type: text/x-patch, Size: 419 bytes --]

--- net/ipv4/netfilter/ipt_hashlimit.c.orig	2005-01-26 22:35:43.000000000 -0500
+++ net/ipv4/netfilter/ipt_hashlimit.c	2005-01-26 22:36:14.000000000 -0500
@@ -570,7 +570,7 @@ static void *dl_seq_start(struct seq_fil
 	if (*pos >= htable->cfg.size)
 		return NULL;
 
-	bucket = kmalloc(sizeof(unsigned int), GFP_KERNEL);
+	bucket = kmalloc(sizeof(unsigned int), GFP_ATOMIC);
 	if (!bucket)
 		return ERR_PTR(-ENOMEM);
 

[-- Attachment #3: ipt_hashlimit.c-proc_show.patch --]
[-- Type: text/x-patch, Size: 701 bytes --]

--- net/ipv4/netfilter/ipt_hashlimit.c.orig	2005-01-26 22:17:54.000000000 -0500
+++ net/ipv4/netfilter/ipt_hashlimit.c	2005-01-26 22:22:07.000000000 -0500
@@ -608,8 +608,8 @@ static inline int dl_seq_real_show(struc
 	/* recalculate to show accurate numbers */
 	rateinfo_recalc(ent, jiffies);
 
-	return seq_printf(s, "%ld %u.%u.%u.%u:%u->%u.%u.%u.%u:%u %u %u %u\n",
-			(ent->expires - jiffies)/HZ,
+	return seq_printf(s, "%lu %u.%u.%u.%u:%u->%u.%u.%u.%u:%u %u %u %u\n",
+			(ent->expires > jiffies) ? (ent->expires - jiffies)/HZ : 0,
 			NIPQUAD(ent->dst.src_ip), ntohs(ent->dst.src_port),
 			NIPQUAD(ent->dst.dst_ip), ntohs(ent->dst.dst_port),
 			ent->rateinfo.credit, ent->rateinfo.credit_cap,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-27  4:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-27  4:13 [PATCH] ipt_hashlimit.c, inline patches broken Samuel Jean

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.