Author: pluto
Date: Sun Jun 19 14:26:52 2005
New Revision: 6154

Removed:
   
netfilter-2.6/patch-o-matic-ng/trunk/net/ipv4/netfilter/ip_conntrack_standalone.c.orig
   
netfilter-2.6/patch-o-matic-ng/trunk/net/ipv4/netfilter/ip_conntrack_standalone.c.rej
Modified:
   
netfilter-2.6/patch-o-matic-ng/trunk/net/ipv4/netfilter/ip_conntrack_standalone.c
   netfilter-2.6/patch-o-matic-ng/trunk/net/ipv4/netfilter/ip_nat_standalone.c
Log:
- 2.6.12 CHANGES merged.


Modified: 
netfilter-2.6/patch-o-matic-ng/trunk/net/ipv4/netfilter/ip_conntrack_standalone.c
==============================================================================
--- 
netfilter-2.6/patch-o-matic-ng/trunk/net/ipv4/netfilter/ip_conntrack_standalone.c
   (original)
+++ 
netfilter-2.6/patch-o-matic-ng/trunk/net/ipv4/netfilter/ip_conntrack_standalone.c
   Sun Jun 19 14:26:52 2005
@@ -151,41 +151,42 @@
                               .tuple.dst.protonum);
        IP_NF_ASSERT(proto);
 
-       if (seq_printf(s, "%-8s %u %lu ",
+       if (seq_printf(s, "%-8s %u %ld ",
                      proto->name,
                      
conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum,
                      timer_pending(&conntrack->timeout)
-                     ? (conntrack->timeout.expires - jiffies)/HZ : 0) != 0)
-               return 1;
+                     ? (long)(conntrack->timeout.expires - jiffies)/HZ
+                     : 0) != 0)
+               return -ENOSPC;
 
        if (proto->print_conntrack(s, conntrack))
-               return 1;
+               return -ENOSPC;
   
        if (print_tuple(s, &conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
                        proto))
-               return 1;
+               return -ENOSPC;
 
        if (seq_print_counters(s, &conntrack->counters[IP_CT_DIR_ORIGINAL]))
-               return 1;
+               return -ENOSPC;
 
        if (!(test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status)))
                if (seq_printf(s, "[UNREPLIED] "))
-                       return 1;
+                       return -ENOSPC;
 
        if (print_tuple(s, &conntrack->tuplehash[IP_CT_DIR_REPLY].tuple,
                        proto))
-               return 1;
+               return -ENOSPC;
 
        if (seq_print_counters(s, &conntrack->counters[IP_CT_DIR_REPLY]))
-               return 1;
+               return -ENOSPC;
 
        if (test_bit(IPS_ASSURED_BIT, &conntrack->status))
                if (seq_printf(s, "[ASSURED] "))
-                       return 1;
+                       return -ENOSPC;
 
 #if defined(CONFIG_IP_NF_CONNTRACK_MARK)
-       if (seq_printf(s, "mark=%ld ", conntrack->mark))
-               return 1;
+       if (seq_printf(s, "mark=%lu ", conntrack->mark))
+               return -ENOSPC;
 #endif
 
 #if defined(CONFIG_IP_NF_MATCH_LAYER7) || 
defined(CONFIG_IP_NF_MATCH_LAYER7_MODULE)
@@ -195,25 +196,11 @@
 #endif
 
        if (seq_printf(s, "use=%u\n", atomic_read(&conntrack->ct_general.use)))
-               return 1;
+               return -ENOSPC;
 
        return 0;
 }
 
-static int ct_seq_show(struct seq_file *s, void *v)
-{
-       struct list_head *list = v;
-       int ret = 0;
-
-       /* FIXME: Simply truncates if hash chain too long. */
-       READ_LOCK(&ip_conntrack_lock);
-       if (LIST_FIND(list, ct_seq_real_show,
-                     struct ip_conntrack_tuple_hash *, s))
-               ret = -ENOSPC;
-       READ_UNLOCK(&ip_conntrack_lock);
-       return ret;
-}
-       
 static struct seq_operations ct_seq_ops = {
        .start = ct_seq_start,
        .next  = ct_seq_next,
@@ -431,16 +418,6 @@
                                      const struct net_device *out,
                                      int (*okfn)(struct sk_buff *))
 {
-       /* We've seen it coming out the other side: confirm it */
-       return ip_conntrack_confirm(pskb);
-}
-
-static unsigned int ip_conntrack_help(unsigned int hooknum,
-                                     struct sk_buff **pskb,
-                                     const struct net_device *in,
-                                     const struct net_device *out,
-                                     int (*okfn)(struct sk_buff *))
-{
        struct ip_conntrack *ct;
        enum ip_conntrack_info ctinfo;
 

Modified: 
netfilter-2.6/patch-o-matic-ng/trunk/net/ipv4/netfilter/ip_nat_standalone.c
==============================================================================
--- netfilter-2.6/patch-o-matic-ng/trunk/net/ipv4/netfilter/ip_nat_standalone.c 
(original)
+++ netfilter-2.6/patch-o-matic-ng/trunk/net/ipv4/netfilter/ip_nat_standalone.c 
Sun Jun 19 14:26:52 2005
@@ -249,25 +249,6 @@
        return NF_ACCEPT;
 }
 
-static unsigned int
-ip_nat_adjust(unsigned int hooknum,
-             struct sk_buff **pskb,
-             const struct net_device *in,
-             const struct net_device *out,
-             int (*okfn)(struct sk_buff *))
-{
-       struct ip_conntrack *ct;
-       enum ip_conntrack_info ctinfo;
-
-       ct = ip_conntrack_get(*pskb, &ctinfo);
-       if (ct && test_bit(IPS_SEQ_ADJUST_BIT, &ct->status)) {
-               DEBUGP("ip_nat_standalone: adjusting sequence number\n");
-               if (!ip_nat_seq_adjust(pskb, ct, ctinfo))
-                       return NF_DROP;
-       }
-       return NF_ACCEPT;
-}
-
 /* We must be after connection tracking and before packet filtering. */
 
 /* Before packet filtering, change destination */
@@ -297,15 +278,6 @@
        .priority       = NF_IP_PRI_NAT_SEQ_ADJUST,
 };
 
-/* After conntrack, adjust sequence number */
-static struct nf_hook_ops ip_nat_adjust_out_ops = {
-       .hook           = ip_nat_adjust,
-       .owner          = THIS_MODULE,
-       .pf             = PF_INET,
-       .hooknum        = NF_IP_POST_ROUTING,
-       .priority       = NF_IP_PRI_NAT_SEQ_ADJUST,
-};
-
 /* Before packet filtering, change destination */
 static struct nf_hook_ops ip_nat_local_out_ops = {
        .hook           = ip_nat_local_fn,
@@ -334,16 +306,6 @@
 };
 
 
-/* After conntrack, adjust sequence number */
-static struct nf_hook_ops ip_nat_adjust_in_ops = {
-       .hook           = ip_nat_adjust,
-       .owner          = THIS_MODULE,
-       .pf             = PF_INET,
-       .hooknum        = NF_IP_LOCAL_IN,
-       .priority       = NF_IP_PRI_NAT_SEQ_ADJUST,
-};
-
-
 static int init_or_cleanup(int init)
 {
        int ret = 0;
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to