All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira <pablo@eurodev.net>
Cc: Harald Welte <laforge@netfilter.org>,
	Netfilter Development Mailinglist
	<netfilter-devel@lists.netfilter.org>
Subject: Re: [PATCH 4/4] conntrack ftp helper modification to use new infrastrure
Date: Mon, 10 Jan 2005 00:20:27 +0100	[thread overview]
Message-ID: <41E1BC3B.5070101@trash.net> (raw)
In-Reply-To: <41E1AEEF.9050005@eurodev.net>

Pablo Neira wrote:

> Attached the modifications for the ftp helper to use the functions 
> provided with the new infrastructure.
>
> Two important notes:
>
> * I must confess that I don't see the point of using the new 
> infrastructure at all for the ftp helper (no way, I didn't drive nuts, 
> not yet :o) but I see that it could be useful for the amanda helper 
> which does a strstr search. So, please consider this just an example, 
> read and drop it to /dev/null.
> * This doesn't apply on top of lastest rusty's helper simplifications.
>
> -- 
> Pablo
>
>------------------------------------------------------------------------
>
>===== net/ipv4/netfilter/ip_conntrack_ftp.c 1.24 vs edited =====
>--- 1.24/net/ipv4/netfilter/ip_conntrack_ftp.c	2004-10-20 10:12:06 +02:00
>+++ edited/net/ipv4/netfilter/ip_conntrack_ftp.c	2005-01-09 21:57:27 +01:00
>@@ -20,17 +20,17 @@
> #include <linux/netfilter_ipv4/ip_conntrack_helper.h>
> #include <linux/netfilter_ipv4/ip_conntrack_ftp.h>
> #include <linux/moduleparam.h>
>+#include <linux/netfilter_ipv4/nf_string_match.h>
> 
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("Rusty Russell <rusty@rustcorp.com.au>");
> MODULE_DESCRIPTION("ftp connection tracking helper");
> 
>-/* This is slow, but it's simple. --RR */
>-static char ftp_buffer[65536];
>-
> static DECLARE_LOCK(ip_ftp_lock);
> struct module *ip_conntrack_ftp = THIS_MODULE;
> 
>+#define FTP_BUFSIZE 64
>+
> #define MAX_PORTS 8
> static int ports[MAX_PORTS];
> static int ports_c;
>@@ -56,30 +56,35 @@
> 	char skip;
> 	char term;
> 	enum ip_ct_ftp_type ftptype;
>+	struct nf_string_match *sm;
>  
>

Why is is part of struct ftpsearch ? One struct nf_string_match per helper
should be enough as long as we take the global lock.

Regards
Patrick

  reply	other threads:[~2005-01-09 23:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-09 22:23 [PATCH 4/4] conntrack ftp helper modification to use new infrastrure Pablo Neira
2005-01-09 23:20 ` Patrick McHardy [this message]
2005-01-09 23:31   ` Pablo Neira
2005-01-09 23:46     ` Patrick McHardy
2005-02-01 11:01       ` Harald Welte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41E1BC3B.5070101@trash.net \
    --to=kaber@trash.net \
    --cc=laforge@netfilter.org \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=pablo@eurodev.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.