X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fipv4%2Fnetfilter%2Fip_conntrack_amanda.c;h=a54ef782f8b5827a4f17dd39959a10fbb27fea14;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=4e8f4d83baf263d3a259c6de5f56ccb4dd032878;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/net/ipv4/netfilter/ip_conntrack_amanda.c b/net/ipv4/netfilter/ip_conntrack_amanda.c index 4e8f4d83b..a54ef782f 100644 --- a/net/ipv4/netfilter/ip_conntrack_amanda.c +++ b/net/ipv4/netfilter/ip_conntrack_amanda.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -34,7 +35,7 @@ static unsigned int master_timeout = 300; MODULE_AUTHOR("Brian J. Murrell "); MODULE_DESCRIPTION("Amanda connection tracking module"); MODULE_LICENSE("GPL"); -MODULE_PARM(master_timeout, "i"); +module_param(master_timeout, int, 0600); MODULE_PARM_DESC(master_timeout, "timeout for the master connection"); static char *conns[] = { "DATA ", "MESG ", "INDEX " }; @@ -48,7 +49,7 @@ static int help(struct sk_buff *skb, { struct ip_conntrack_expect *exp; struct ip_ct_amanda_expect *exp_amanda_info; - char *data, *data_limit, *tmp; + char *amp, *data, *data_limit, *tmp; unsigned int dataoff, i; u_int16_t port, len; @@ -58,7 +59,7 @@ static int help(struct sk_buff *skb, /* increase the UDP timeout of the master connection as replies from * Amanda clients to the server can be quite delayed */ - ip_ct_refresh(ct, master_timeout * HZ); + ip_ct_refresh_acct(ct, ctinfo, NULL, master_timeout * HZ); /* No data? */ dataoff = skb->nh.iph->ihl*4 + sizeof(struct udphdr); @@ -69,9 +70,11 @@ static int help(struct sk_buff *skb, } LOCK_BH(&amanda_buffer_lock); - skb_copy_bits(skb, dataoff, amanda_buffer, skb->len - dataoff); - data = amanda_buffer; - data_limit = amanda_buffer + skb->len - dataoff; + amp = skb_header_pointer(skb, dataoff, + skb->len - dataoff, amanda_buffer); + BUG_ON(amp == NULL); + data = amp; + data_limit = amp + skb->len - dataoff; *data_limit = '\0'; /* Search for the CONNECT string */ @@ -107,7 +110,7 @@ static int help(struct sk_buff *skb, exp->mask.dst.u.tcp.port = 0xFFFF; exp_amanda_info = &exp->help.exp_amanda_info; - exp_amanda_info->offset = tmp - amanda_buffer; + exp_amanda_info->offset = tmp - amp; exp_amanda_info->port = port; exp_amanda_info->len = len;