Author: pluto                        Date: Thu Sep 15 09:30:43 2005 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- ported to 2.6.13.

---- Files affected:
SOURCES:
   linux-2.6-nf-u32.patch (1.1.2.1 -> 1.1.2.2) 

---- Diffs:

================================================================
Index: SOURCES/linux-2.6-nf-u32.patch
diff -u SOURCES/linux-2.6-nf-u32.patch:1.1.2.1 
SOURCES/linux-2.6-nf-u32.patch:1.1.2.2
--- SOURCES/linux-2.6-nf-u32.patch:1.1.2.1      Thu Sep 15 10:41:11 2005
+++ SOURCES/linux-2.6-nf-u32.patch      Thu Sep 15 11:30:37 2005
@@ -1,8 +1,8 @@
  include/linux/netfilter_ipv4/ipt_u32.h |   40 +++++
  net/ipv4/netfilter/Kconfig             |   13 +
- net/ipv4/netfilter/Makefile            |    3 
- net/ipv4/netfilter/ipt_u32.c           |  233 
+++++++++++++++++++++++++++++++++
- 4 files changed, 289 insertions(+)
+ net/ipv4/netfilter/Makefile            |    1 
+ net/ipv4/netfilter/ipt_u32.c           |  232 
+++++++++++++++++++++++++++++++++
+ 4 files changed, 286 insertions(+)
 
 diff -uNr linux-2.6.13.1/include.orig/linux/netfilter_ipv4/ipt_u32.h 
linux-2.6.13.1/include/linux/netfilter_ipv4/ipt_u32.h
 --- linux-2.6.13.1/include.orig/linux/netfilter_ipv4/ipt_u32.h 1970-01-01 
01:00:00.000000000 +0100
@@ -51,7 +51,7 @@
 diff -uNr linux-2.6.13.1/net.orig/ipv4/netfilter/ipt_u32.c 
linux-2.6.13.1/net/ipv4/netfilter/ipt_u32.c
 --- linux-2.6.13.1/net.orig/ipv4/netfilter/ipt_u32.c   1970-01-01 
01:00:00.000000000 +0100
 +++ linux-2.6.13.1/net/ipv4/netfilter/ipt_u32.c        2005-09-15 
10:39:55.326807500 +0200
-@@ -0,0 +1,233 @@
+@@ -0,0 +1,232 @@
 +/* Kernel module to match u32 packet content. */
 +
 +/* 
@@ -159,7 +159,6 @@
 +
 +#include <linux/netfilter_ipv4/ipt_u32.h>
 +#include <linux/netfilter_ipv4/ip_tables.h>
-+#include <linux/netfilter_ipv4/lockhelp.h>
 +
 +/* #include <asm-i386/timex.h> for timing */
 +
@@ -169,7 +168,7 @@
 +
 +/* This is slow, but it's simple. --RR */
 +static char u32_buffer[65536];
-+static DECLARE_LOCK(u32_lock);
++static DEFINE_RWLOCK(u32_lock);
 +
 +static int
 +match(const struct sk_buff *skb,
@@ -190,7 +189,7 @@
 +
 +      u_int32_t AttPos;
 +
-+      LOCK_BH(&u32_lock);
++      spin_lock_bh(&u32_lock);
 +
 +      head = skb_header_pointer(skb, 0, skb->len, u32_buffer);
 +      BUG_ON(head == NULL);
@@ -202,7 +201,7 @@
 +              AttPos = 0;
 +              pos = data->tests[testind].location[0].number;
 +              if (AttPos + pos + 3 > skb->len || AttPos + pos < 0){
-+                      UNLOCK_BH(&u32_lock);
++                      spin_unlock_bh(&u32_lock);
 +                      return 0;
 +              }
 +              val = (base[pos]<<24) + (base[pos+1]<<16) +
@@ -244,13 +243,13 @@
 +                      /* cycles2 = get_cycles(); 
 +                         printk("failed %d in %d cycles\n", testind, 
 +                                cycles2-cycles1); */
-+                      UNLOCK_BH(&u32_lock);
++                      spin_unlock_bh(&u32_lock);
 +                      return 0;
 +              }
 +      }
 +      /* cycles2 = get_cycles();
 +         printk("succeeded in %d cycles\n", cycles2-cycles1); */
-+      UNLOCK_BH(&u32_lock);
++      spin_unlock_bh(&u32_lock);
 +      return 1;
 +}
 +
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/SOURCES/linux-2.6-nf-u32.patch?r1=1.1.2.1&r2=1.1.2.2&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to