Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-drm-fsl-dcu.git] / net / ipv4 / netfilter / ip_conntrack_standalone.c
index 02135756562e2a1be0f281496d74c2ba44bc170b..5903588fddceec2090954b2fc5cdbcf1f424f38d 100644 (file)
@@ -28,9 +28,6 @@
 #include <net/ip.h>
 #include <net/route.h>
 
-#define ASSERT_READ_LOCK(x)
-#define ASSERT_WRITE_LOCK(x)
-
 #include <linux/netfilter_ipv4/ip_conntrack.h>
 #include <linux/netfilter_ipv4/ip_conntrack_protocol.h>
 #include <linux/netfilter_ipv4/ip_conntrack_core.h>
@@ -49,7 +46,7 @@ DECLARE_PER_CPU(struct ip_conntrack_stat, ip_conntrack_stat);
 
 static int kill_proto(struct ip_conntrack *i, void *data)
 {
-       return (i->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum == 
+       return (i->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum ==
                        *((u_int8_t *) data));
 }
 
@@ -127,19 +124,18 @@ static void *ct_seq_next(struct seq_file *s, void *v, loff_t *pos)
        (*pos)++;
        return ct_get_next(s, v);
 }
-  
+
 static void ct_seq_stop(struct seq_file *s, void *v)
 {
        read_unlock_bh(&ip_conntrack_lock);
 }
+
 static int ct_seq_show(struct seq_file *s, void *v)
 {
        const struct ip_conntrack_tuple_hash *hash = v;
        const struct ip_conntrack *conntrack = tuplehash_to_ctrack(hash);
        struct ip_conntrack_protocol *proto;
 
-       ASSERT_READ_LOCK(&ip_conntrack_lock);
        IP_NF_ASSERT(conntrack);
 
        /* we only want to print DIR_ORIGINAL */
@@ -159,12 +155,12 @@ static int ct_seq_show(struct seq_file *s, void *v)
 
        if (proto->print_conntrack(s, conntrack))
                return -ENOSPC;
-  
+
        if (print_tuple(s, &conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
                        proto))
                return -ENOSPC;
 
-       if (seq_print_counters(s, &conntrack->counters[IP_CT_DIR_ORIGINAL]))
+       if (seq_print_counters(s, &conntrack->counters[IP_CT_DIR_ORIGINAL]))
                return -ENOSPC;
 
        if (!(test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status)))
@@ -175,7 +171,7 @@ static int ct_seq_show(struct seq_file *s, void *v)
                        proto))
                return -ENOSPC;
 
-       if (seq_print_counters(s, &conntrack->counters[IP_CT_DIR_REPLY]))
+       if (seq_print_counters(s, &conntrack->counters[IP_CT_DIR_REPLY]))
                return -ENOSPC;
 
        if (test_bit(IPS_ASSURED_BIT, &conntrack->status))
@@ -204,7 +200,7 @@ static struct seq_operations ct_seq_ops = {
        .stop  = ct_seq_stop,
        .show  = ct_seq_show
 };
-  
+
 static int ct_open(struct inode *inode, struct file *file)
 {
        struct seq_file *seq;
@@ -233,7 +229,7 @@ static struct file_operations ct_file_ops = {
        .llseek  = seq_lseek,
        .release = seq_release_private,
 };
-  
+
 /* expects */
 static void *exp_seq_start(struct seq_file *s, loff_t *pos)
 {
@@ -257,7 +253,7 @@ static void *exp_seq_start(struct seq_file *s, loff_t *pos)
 
 static void *exp_seq_next(struct seq_file *s, void *v, loff_t *pos)
 {
-       struct list_head *e = v;
+       struct list_head *e = v;
 
        ++*pos;
        e = e->next;
@@ -301,7 +297,7 @@ static int exp_open(struct inode *inode, struct file *file)
 {
        return seq_open(file, &exp_seq_ops);
 }
-  
+
 static struct file_operations exp_file_ops = {
        .owner   = THIS_MODULE,
        .open    = exp_open,
@@ -430,14 +426,14 @@ static unsigned int ip_conntrack_help(unsigned int hooknum,
 }
 
 static unsigned int ip_conntrack_defrag(unsigned int hooknum,
-                                       struct sk_buff **pskb,
-                                       const struct net_device *in,
-                                       const struct net_device *out,
-                                       int (*okfn)(struct sk_buff *))
+                                       struct sk_buff **pskb,
+                                       const struct net_device *in,
+                                       const struct net_device *out,
+                                       int (*okfn)(struct sk_buff *))
 {
 #if !defined(CONFIG_IP_NF_NAT) && !defined(CONFIG_IP_NF_NAT_MODULE)
        /* Previously seen (loopback)?  Ignore.  Do this before
-           fragment check. */
+          fragment check. */
        if ((*pskb)->nfct)
                return NF_ACCEPT;
 #endif
@@ -445,7 +441,7 @@ static unsigned int ip_conntrack_defrag(unsigned int hooknum,
        /* Gather fragments. */
        if ((*pskb)->nh.iph->frag_off & htons(IP_MF|IP_OFFSET)) {
                *pskb = ip_ct_gather_frags(*pskb,
-                                          hooknum == NF_IP_PRE_ROUTING ? 
+                                          hooknum == NF_IP_PRE_ROUTING ?
                                           IP_DEFRAG_CONNTRACK_IN :
                                           IP_DEFRAG_CONNTRACK_OUT);
                if (!*pskb)
@@ -780,7 +776,7 @@ static ctl_table ip_ct_net_table[] = {
        {
                .ctl_name       = CTL_NET,
                .procname       = "net",
-               .mode           = 0555, 
+               .mode           = 0555,
                .child          = ip_ct_ipv4_table,
        },
        { .ctl_name = 0 }
@@ -926,7 +922,7 @@ EXPORT_SYMBOL(__ip_ct_refresh_acct);
 EXPORT_SYMBOL(ip_conntrack_expect_alloc);
 EXPORT_SYMBOL(ip_conntrack_expect_put);
 EXPORT_SYMBOL_GPL(__ip_conntrack_expect_find);
-EXPORT_SYMBOL_GPL(ip_conntrack_expect_find);
+EXPORT_SYMBOL_GPL(ip_conntrack_expect_find_get);
 EXPORT_SYMBOL(ip_conntrack_expect_related);
 EXPORT_SYMBOL(ip_conntrack_unexpect_related);
 EXPORT_SYMBOL_GPL(ip_conntrack_expect_list);