* [PATCH] ipt_recent-0.2.2
2002-06-21 17:17 ` Harald Welte
@ 2002-06-21 18:26 ` Stephen Frost
0 siblings, 0 replies; 3+ messages in thread
From: Stephen Frost @ 2002-06-21 18:26 UTC (permalink / raw)
To: Harald Welte, Netfilter Development Mailinglist
[-- Attachment #1.1: Type: text/plain, Size: 649 bytes --]
* Harald Welte (laforge@gnumonks.org) wrote:
> On Tue, Jun 18, 2002 at 12:34:39AM -0400, Stephen Frost wrote:
> > Hey all,
> >
> > Version 0.2.1 of my ipt_recent module has been up and running on my
>
> thanks. For future reference: please send patches as mime attachment,
> uncompressed. this way i can read them in the mailer and don't need to save,
> unzip them before.
No problem, just thought it a little large to send uncompressed.
Hopefully this one is better; just a minor bugfix.
Changelog:
- If not SET and not found, return immediately instead of flipping the
hash entries first (in the event of a collision).
[-- Attachment #1.2: ipt_recent-0.2.2.patch --]
[-- Type: text/plain, Size: 2151 bytes --]
diff -uNr netfilter-old/userspace/patch-o-matic/extra/recent.patch netfilter/userspace/patch-o-matic/extra/recent.patch
--- netfilter-old/userspace/patch-o-matic/extra/recent.patch Fri Jun 21 09:49:01 2002
+++ netfilter/userspace/patch-o-matic/extra/recent.patch Fri Jun 21 10:10:13 2002
@@ -26,7 +26,7 @@
+#endif /*_IPT_RECENT_H*/
diff -uNr linux-2.4.18-clean/net/ipv4/netfilter/ipt_recent.c linux-2.4.18/net/ipv4/netfilter/ipt_recent.c
--- linux-2.4.18-clean/net/ipv4/netfilter/ipt_recent.c Wed Dec 31 19:00:00 1969
-+++ linux-2.4.18/net/ipv4/netfilter/ipt_recent.c Mon Jun 17 20:13:00 2002
++++ linux-2.4.18/net/ipv4/netfilter/ipt_recent.c Fri Jun 21 10:06:15 2002
@@ -0,0 +1,786 @@
+/* Kernel module to check if the source address has been seen recently. */
+#include <linux/module.h>
@@ -51,7 +51,7 @@
+static int debug = 0;
+
+#define RECENT_NAME "ipt_recent"
-+#define RECENT_VER "v0.2.1"
++#define RECENT_VER "v0.2.2"
+
+static char version[] =
+KERN_INFO RECENT_NAME " " RECENT_VER ": Stephen Frost <sfrost@snowman.net>. http://snowman.net/projects/ipt_recent/\n";
@@ -394,6 +394,13 @@
+ hash_result = (hash_result + 1) % ip_list_hash_size;
+ }
+ }
++
++ if(hash_table[hash_result] == -1 && !(info->check_set & IPT_RECENT_SET)) {
++ /* IP not in list and not asked to SET */
++ spin_unlock_bh(&curr_table->list_lock);
++ return ans;
++ }
++
+ /* Check if we need to handle the collision, do not need to on REMOVE */
+ if(orig_hash_result != hash_result && !(info->check_set & IPT_RECENT_REMOVE)) {
+ if(debug) printk(KERN_INFO "ipt_recent: match(): Collision in hash table. (or: %d,hr: %d,oa: %u,ha: %u)\n",
@@ -431,13 +438,6 @@
+ if(hash_table[hash_result] == -1) {
+ if(debug) printk(KERN_INFO "ipt_recent: match(): New table entry. (hr: %d,ha: %u)\n",
+ hash_result, addr);
-+
-+ /* New item, find place to put it */
-+ if(!(info->check_set & IPT_RECENT_SET)) {
-+ /* IP not in list and not asked to SET */
-+ spin_unlock_bh(&curr_table->list_lock);
-+ return ans;
-+ }
+
+ /* New item found and IPT_RECENT_SET, so we need to add it */
+ location = time_info[curr_table->time_pos].position;
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ipt_recent-0.2.2
@ 2002-07-01 11:27 Stephen Frost
2002-07-02 14:22 ` Harald Welte
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Frost @ 2002-07-01 11:27 UTC (permalink / raw)
To: Harald Welte, Netfilter Development Mailinglist
[-- Attachment #1.1: Type: text/plain, Size: 266 bytes --]
Harald,
Sending this again with hopes that it will get in before the next
official release. Just a small bugfix, thanks.
Changelog:
- If not SET and not found, return immediately instead of flipping the
hash entries first (in the event of a collision).
[-- Attachment #1.2: ipt_recent-0.2.2.patch --]
[-- Type: text/plain, Size: 2151 bytes --]
diff -uNr netfilter-old/userspace/patch-o-matic/extra/recent.patch netfilter/userspace/patch-o-matic/extra/recent.patch
--- netfilter-old/userspace/patch-o-matic/extra/recent.patch Fri Jun 21 09:49:01 2002
+++ netfilter/userspace/patch-o-matic/extra/recent.patch Fri Jun 21 10:10:13 2002
@@ -26,7 +26,7 @@
+#endif /*_IPT_RECENT_H*/
diff -uNr linux-2.4.18-clean/net/ipv4/netfilter/ipt_recent.c linux-2.4.18/net/ipv4/netfilter/ipt_recent.c
--- linux-2.4.18-clean/net/ipv4/netfilter/ipt_recent.c Wed Dec 31 19:00:00 1969
-+++ linux-2.4.18/net/ipv4/netfilter/ipt_recent.c Mon Jun 17 20:13:00 2002
++++ linux-2.4.18/net/ipv4/netfilter/ipt_recent.c Fri Jun 21 10:06:15 2002
@@ -0,0 +1,786 @@
+/* Kernel module to check if the source address has been seen recently. */
+#include <linux/module.h>
@@ -51,7 +51,7 @@
+static int debug = 0;
+
+#define RECENT_NAME "ipt_recent"
-+#define RECENT_VER "v0.2.1"
++#define RECENT_VER "v0.2.2"
+
+static char version[] =
+KERN_INFO RECENT_NAME " " RECENT_VER ": Stephen Frost <sfrost@snowman.net>. http://snowman.net/projects/ipt_recent/\n";
@@ -394,6 +394,13 @@
+ hash_result = (hash_result + 1) % ip_list_hash_size;
+ }
+ }
++
++ if(hash_table[hash_result] == -1 && !(info->check_set & IPT_RECENT_SET)) {
++ /* IP not in list and not asked to SET */
++ spin_unlock_bh(&curr_table->list_lock);
++ return ans;
++ }
++
+ /* Check if we need to handle the collision, do not need to on REMOVE */
+ if(orig_hash_result != hash_result && !(info->check_set & IPT_RECENT_REMOVE)) {
+ if(debug) printk(KERN_INFO "ipt_recent: match(): Collision in hash table. (or: %d,hr: %d,oa: %u,ha: %u)\n",
@@ -431,13 +438,6 @@
+ if(hash_table[hash_result] == -1) {
+ if(debug) printk(KERN_INFO "ipt_recent: match(): New table entry. (hr: %d,ha: %u)\n",
+ hash_result, addr);
-+
-+ /* New item, find place to put it */
-+ if(!(info->check_set & IPT_RECENT_SET)) {
-+ /* IP not in list and not asked to SET */
-+ spin_unlock_bh(&curr_table->list_lock);
-+ return ans;
-+ }
+
+ /* New item found and IPT_RECENT_SET, so we need to add it */
+ location = time_info[curr_table->time_pos].position;
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ipt_recent-0.2.2
2002-07-01 11:27 [PATCH] ipt_recent-0.2.2 Stephen Frost
@ 2002-07-02 14:22 ` Harald Welte
0 siblings, 0 replies; 3+ messages in thread
From: Harald Welte @ 2002-07-02 14:22 UTC (permalink / raw)
To: Netfilter Development Mailinglist
[-- Attachment #1: Type: text/plain, Size: 549 bytes --]
On Mon, Jul 01, 2002 at 07:27:31AM -0400, Stephen Frost wrote:
> Harald,
>
> Sending this again with hopes that it will get in before the next
> official release. Just a small bugfix, thanks.
applied.
--
Live long and prosper
- Harald Welte / laforge@gnumonks.org http://www.gnumonks.org/
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M-
V-- PS+ PE-- Y+ PGP++ t++ 5-- !X !R tv-- b+++ DI? !D G+ e* h+ r% y+(*)
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-07-02 14:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-01 11:27 [PATCH] ipt_recent-0.2.2 Stephen Frost
2002-07-02 14:22 ` Harald Welte
-- strict thread matches above, loose matches on Subject: below --
2002-06-18 4:34 ipt_recent-0.2.1 [PATCH] Stephen Frost
2002-06-21 17:17 ` Harald Welte
2002-06-21 18:26 ` [PATCH] ipt_recent-0.2.2 Stephen Frost
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.