aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/ip_conntrack_standalone.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:38:13 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:38:13 -0500
commitcb18eccff48ef3986d1072964590bce6fec705fb (patch)
tree777fb1d15e0281341e1e02c9803d989538d346f2 /net/ipv4/netfilter/ip_conntrack_standalone.c
parentc827ba4cb49a30ce581201fd0ba2be77cde412c7 (diff)
parent5ef213f6842277ee1df5659f59fac0ffc9beb411 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (45 commits) [IPV4]: Restore multipath routing after rt_next changes. [XFRM] IPV6: Fix outbound RO transformation which is broken by IPsec tunnel patch. [NET]: Reorder fields of struct dst_entry [DECNET]: Convert decnet route to use the new dst_entry 'next' pointer [IPV6]: Convert ipv6 route to use the new dst_entry 'next' pointer [IPV4]: Convert ipv4 route to use the new dst_entry 'next' pointer [NET]: Introduce union in struct dst_entry to hold 'next' pointer [DECNET]: fix misannotation of linkinfo_dn [DECNET]: FRA_{DST,SRC} are le16 for decnet [UDP]: UDP can use sk_hash to speedup lookups [NET]: Fix whitespace errors. [NET] XFRM: Fix whitespace errors. [NET] X25: Fix whitespace errors. [NET] WANROUTER: Fix whitespace errors. [NET] UNIX: Fix whitespace errors. [NET] TIPC: Fix whitespace errors. [NET] SUNRPC: Fix whitespace errors. [NET] SCTP: Fix whitespace errors. [NET] SCHED: Fix whitespace errors. [NET] RXRPC: Fix whitespace errors. ...
Diffstat (limited to 'net/ipv4/netfilter/ip_conntrack_standalone.c')
-rw-r--r--net/ipv4/netfilter/ip_conntrack_standalone.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c
index 86efb544967..5903588fddc 100644
--- a/net/ipv4/netfilter/ip_conntrack_standalone.c
+++ b/net/ipv4/netfilter/ip_conntrack_standalone.c
@@ -46,7 +46,7 @@ DECLARE_PER_CPU(struct ip_conntrack_stat, ip_conntrack_stat);
46 46
47static int kill_proto(struct ip_conntrack *i, void *data) 47static int kill_proto(struct ip_conntrack *i, void *data)
48{ 48{
49 return (i->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum == 49 return (i->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum ==
50 *((u_int8_t *) data)); 50 *((u_int8_t *) data));
51} 51}
52 52
@@ -124,12 +124,12 @@ static void *ct_seq_next(struct seq_file *s, void *v, loff_t *pos)
124 (*pos)++; 124 (*pos)++;
125 return ct_get_next(s, v); 125 return ct_get_next(s, v);
126} 126}
127 127
128static void ct_seq_stop(struct seq_file *s, void *v) 128static void ct_seq_stop(struct seq_file *s, void *v)
129{ 129{
130 read_unlock_bh(&ip_conntrack_lock); 130 read_unlock_bh(&ip_conntrack_lock);
131} 131}
132 132
133static int ct_seq_show(struct seq_file *s, void *v) 133static int ct_seq_show(struct seq_file *s, void *v)
134{ 134{
135 const struct ip_conntrack_tuple_hash *hash = v; 135 const struct ip_conntrack_tuple_hash *hash = v;
@@ -155,12 +155,12 @@ static int ct_seq_show(struct seq_file *s, void *v)
155 155
156 if (proto->print_conntrack(s, conntrack)) 156 if (proto->print_conntrack(s, conntrack))
157 return -ENOSPC; 157 return -ENOSPC;
158 158
159 if (print_tuple(s, &conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple, 159 if (print_tuple(s, &conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
160 proto)) 160 proto))
161 return -ENOSPC; 161 return -ENOSPC;
162 162
163 if (seq_print_counters(s, &conntrack->counters[IP_CT_DIR_ORIGINAL])) 163 if (seq_print_counters(s, &conntrack->counters[IP_CT_DIR_ORIGINAL]))
164 return -ENOSPC; 164 return -ENOSPC;
165 165
166 if (!(test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status))) 166 if (!(test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status)))
@@ -171,7 +171,7 @@ static int ct_seq_show(struct seq_file *s, void *v)
171 proto)) 171 proto))
172 return -ENOSPC; 172 return -ENOSPC;
173 173
174 if (seq_print_counters(s, &conntrack->counters[IP_CT_DIR_REPLY])) 174 if (seq_print_counters(s, &conntrack->counters[IP_CT_DIR_REPLY]))
175 return -ENOSPC; 175 return -ENOSPC;
176 176
177 if (test_bit(IPS_ASSURED_BIT, &conntrack->status)) 177 if (test_bit(IPS_ASSURED_BIT, &conntrack->status))
@@ -200,7 +200,7 @@ static struct seq_operations ct_seq_ops = {
200 .stop = ct_seq_stop, 200 .stop = ct_seq_stop,
201 .show = ct_seq_show 201 .show = ct_seq_show
202}; 202};
203 203
204static int ct_open(struct inode *inode, struct file *file) 204static int ct_open(struct inode *inode, struct file *file)
205{ 205{
206 struct seq_file *seq; 206 struct seq_file *seq;
@@ -229,7 +229,7 @@ static struct file_operations ct_file_ops = {
229 .llseek = seq_lseek, 229 .llseek = seq_lseek,
230 .release = seq_release_private, 230 .release = seq_release_private,
231}; 231};
232 232
233/* expects */ 233/* expects */
234static void *exp_seq_start(struct seq_file *s, loff_t *pos) 234static void *exp_seq_start(struct seq_file *s, loff_t *pos)
235{ 235{
@@ -253,7 +253,7 @@ static void *exp_seq_start(struct seq_file *s, loff_t *pos)
253 253
254static void *exp_seq_next(struct seq_file *s, void *v, loff_t *pos) 254static void *exp_seq_next(struct seq_file *s, void *v, loff_t *pos)
255{ 255{
256 struct list_head *e = v; 256 struct list_head *e = v;
257 257
258 ++*pos; 258 ++*pos;
259 e = e->next; 259 e = e->next;
@@ -297,7 +297,7 @@ static int exp_open(struct inode *inode, struct file *file)
297{ 297{
298 return seq_open(file, &exp_seq_ops); 298 return seq_open(file, &exp_seq_ops);
299} 299}
300 300
301static struct file_operations exp_file_ops = { 301static struct file_operations exp_file_ops = {
302 .owner = THIS_MODULE, 302 .owner = THIS_MODULE,
303 .open = exp_open, 303 .open = exp_open,
@@ -426,14 +426,14 @@ static unsigned int ip_conntrack_help(unsigned int hooknum,
426} 426}
427 427
428static unsigned int ip_conntrack_defrag(unsigned int hooknum, 428static unsigned int ip_conntrack_defrag(unsigned int hooknum,
429 struct sk_buff **pskb, 429 struct sk_buff **pskb,
430 const struct net_device *in, 430 const struct net_device *in,
431 const struct net_device *out, 431 const struct net_device *out,
432 int (*okfn)(struct sk_buff *)) 432 int (*okfn)(struct sk_buff *))
433{ 433{
434#if !defined(CONFIG_IP_NF_NAT) && !defined(CONFIG_IP_NF_NAT_MODULE) 434#if !defined(CONFIG_IP_NF_NAT) && !defined(CONFIG_IP_NF_NAT_MODULE)
435 /* Previously seen (loopback)? Ignore. Do this before 435 /* Previously seen (loopback)? Ignore. Do this before
436 fragment check. */ 436 fragment check. */
437 if ((*pskb)->nfct) 437 if ((*pskb)->nfct)
438 return NF_ACCEPT; 438 return NF_ACCEPT;
439#endif 439#endif
@@ -441,7 +441,7 @@ static unsigned int ip_conntrack_defrag(unsigned int hooknum,
441 /* Gather fragments. */ 441 /* Gather fragments. */
442 if ((*pskb)->nh.iph->frag_off & htons(IP_MF|IP_OFFSET)) { 442 if ((*pskb)->nh.iph->frag_off & htons(IP_MF|IP_OFFSET)) {
443 *pskb = ip_ct_gather_frags(*pskb, 443 *pskb = ip_ct_gather_frags(*pskb,
444 hooknum == NF_IP_PRE_ROUTING ? 444 hooknum == NF_IP_PRE_ROUTING ?
445 IP_DEFRAG_CONNTRACK_IN : 445 IP_DEFRAG_CONNTRACK_IN :
446 IP_DEFRAG_CONNTRACK_OUT); 446 IP_DEFRAG_CONNTRACK_OUT);
447 if (!*pskb) 447 if (!*pskb)
@@ -776,7 +776,7 @@ static ctl_table ip_ct_net_table[] = {
776 { 776 {
777 .ctl_name = CTL_NET, 777 .ctl_name = CTL_NET,
778 .procname = "net", 778 .procname = "net",
779 .mode = 0555, 779 .mode = 0555,
780 .child = ip_ct_ipv4_table, 780 .child = ip_ct_ipv4_table,
781 }, 781 },
782 { .ctl_name = 0 } 782 { .ctl_name = 0 }