[netfilter-cvslog] r3837 -
trunk/patch-o-matic-ng/rsh/linux-2.6.11/net/ipv4/netfilter
laforge at netfilter.org
laforge at netfilter.org
Sun Apr 10 14:36:36 CEST 2005
Author: laforge at netfilter.org
Date: 2005-04-10 14:36:36 +0200 (Sun, 10 Apr 2005)
New Revision: 3837
Modified:
trunk/patch-o-matic-ng/rsh/linux-2.6.11/net/ipv4/netfilter/ip_conntrack_rsh.c
Log:
first untested but compiling 2.6.11 version
Modified: trunk/patch-o-matic-ng/rsh/linux-2.6.11/net/ipv4/netfilter/ip_conntrack_rsh.c
===================================================================
--- trunk/patch-o-matic-ng/rsh/linux-2.6.11/net/ipv4/netfilter/ip_conntrack_rsh.c 2005-04-10 12:28:41 UTC (rev 3836)
+++ trunk/patch-o-matic-ng/rsh/linux-2.6.11/net/ipv4/netfilter/ip_conntrack_rsh.c 2005-04-10 12:36:36 UTC (rev 3837)
@@ -116,12 +116,12 @@
MODULE_DESCRIPTION("RSH connection tracking module");
MODULE_LICENSE("GPL");
#ifdef MODULE_PARM
-module_param_array(ports, int, &ports_c, 0400);
+module_param_array(ports, int, &ports_n_c, 0400);
MODULE_PARM_DESC(ports, "port numbers of RSH servers");
#endif
-static DECLARE_LOCK(ip_rsh_lock);
-static char rsh_buffer char[65535];
+static DECLARE_LOCK(rsh_buffer_lock);
+static char rsh_buffer[65535];
unsigned int (*ip_nat_rsh_hook)(struct sk_buff **pskb,
enum ip_conntrack_info ctinfo,
@@ -144,13 +144,9 @@
char *data, *rb_ptr;
int ret = NF_ACCEPT;
- /* tcplen not negative guarenteed by ip_conntrack_tcp.c */
- //struct tcphdr *tcph = (void *) iph + iph->ihl * 4;
- //const char *data = (const char *) tcph + tcph->doff * 4;
- u_int32_t tcplen = len - iph->ihl * 4;
int dir = CTINFO2DIR(ctinfo);
struct ip_conntrack_expect *exp;
- struct ip_ct_rsh_expect *exp_rsh_info = &exp->help.exp_rsh_info;
+ unsigned int dataoff;
u_int16_t port;
int maxoctet;
@@ -178,22 +174,10 @@
if (!th)
return NF_ACCEPT;
-#if 0
- /* Checksum invalid? Ignore. */
- /* FIXME: Source route IP option packets --RR */
- if (tcp_v4_check(tcph, tcplen, iph->saddr, iph->daddr,
- csum_partial((char *) tcph, tcplen, 0))) {
- DEBUGP("bad csum: %p %u %u.%u.%u.%u %u.%u.%u.%u\n",
- tcph, tcplen, NIPQUAD(iph->saddr),
- NIPQUAD(iph->daddr));
- return NF_ACCEPT;
- }
-#endif
-
/* No data? */
dataoff = (*pskb)->nh.iph->ihl*4 + th->doff*4;
if (dataoff >= (*pskb)->len)
- return NF_ACCEPT:
+ return NF_ACCEPT;
LOCK_BH(&rsh_buffer_lock);
rb_ptr = skb_header_pointer(*pskb, dataoff,
@@ -272,7 +256,7 @@
ntohs(exp->mask.dst.u.tcp.port));
out:
- UNLOCK_BH(&ip_rsh_lock);
+ UNLOCK_BH(&rsh_buffer_lock);
return ret;
}
@@ -303,7 +287,6 @@
rsh_helpers[port].me = THIS_MODULE;
rsh_helpers[port].max_expected = 1;
- rsh_helpers[port].flags = IP_CT_HELPER_F_REUSE_EXPECT;
rsh_helpers[port].timeout = 0;
rsh_helpers[port].tuple.dst.protonum = IPPROTO_TCP;
More information about the netfilter-cvslog
mailing list