All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] FTP sequence tracking cleanups
@ 2005-04-01  1:37 Phil Oester
  2005-04-03 18:37 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Oester @ 2005-04-01  1:37 UTC (permalink / raw)
  To: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 133 bytes --]

The 2.6.11 changes incorrectly pass seq to a couple of functions as a u16.
In addition, a few DEBUGP statements were broken.

Phil



[-- Attachment #2: patch-ftp1 --]
[-- Type: text/plain, Size: 1676 bytes --]

diff -ru linux-orig/net/ipv4/netfilter/ip_conntrack_ftp.c linux-new/net/ipv4/netfilter/ip_conntrack_ftp.c
--- linux-orig/net/ipv4/netfilter/ip_conntrack_ftp.c	2005-03-02 02:38:38.000000000 -0500
+++ linux-new/net/ipv4/netfilter/ip_conntrack_ftp.c	2005-03-31 12:47:48.501244792 -0500
@@ -252,7 +252,7 @@
 }
 
 /* Look up to see if we're just after a \n. */
-static int find_nl_seq(u16 seq, const struct ip_ct_ftp_master *info, int dir)
+static int find_nl_seq(u32 seq, const struct ip_ct_ftp_master *info, int dir)
 {
 	unsigned int i;
 
@@ -263,7 +263,7 @@
 }
 
 /* We don't update if it's older than what we have. */
-static void update_nl_seq(u16 nl_seq, struct ip_ct_ftp_master *info, int dir)
+static void update_nl_seq(u32 nl_seq, struct ip_ct_ftp_master *info, int dir)
 {
 	unsigned int i, oldest = NUM_SEQ_TO_REMEMBER;
 
@@ -330,9 +330,9 @@
 	/* Look up to see if we're just after a \n. */
 	if (!find_nl_seq(ntohl(th->seq), ct_ftp_info, dir)) {
 		/* Now if this ends in \n, update ftp info. */
-		DEBUGP("ip_conntrack_ftp_help: wrong seq pos %s(%u) or %s(%u)\n",
-		       ct_ftp_info->seq_aft_nl[0][dir] 
-		       old_seq_aft_nl_set ? "":"(UNSET) ", old_seq_aft_nl);
+		DEBUGP("ip_conntrack_ftp_help: wrong seq pos %s(%u)\n",
+		       ct_ftp_info->seq_aft_nl[0][dir] ? "":"(UNSET),
+		       ct_ftp_info->seq_aft_nl[0][dir]);
 		ret = NF_ACCEPT;
 		goto out_update_nl;
 	}
@@ -373,7 +373,7 @@
 		goto out_update_nl;
 	}
 
-	DEBUGP("conntrack_ftp: match `%s' (%u bytes at %u)\n",
+	DEBUGP("conntrack_ftp: match `%.26s' (%u bytes at %u)\n",
 	       fb_ptr + matchoff, matchlen, ntohl(th->seq) + matchoff);
 			 
 	/* Allocate expectation which will be inserted */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] FTP sequence tracking cleanups
  2005-04-01  1:37 [PATCH] FTP sequence tracking cleanups Phil Oester
@ 2005-04-03 18:37 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2005-04-03 18:37 UTC (permalink / raw)
  To: Phil Oester; +Cc: netfilter-devel

Phil Oester wrote:
> The 2.6.11 changes incorrectly pass seq to a couple of functions as a u16.
> In addition, a few DEBUGP statements were broken.

I already have a similar patch from Yasuyuki queued.

Regards
Patrick

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-04-03 18:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-01  1:37 [PATCH] FTP sequence tracking cleanups Phil Oester
2005-04-03 18:37 ` Patrick McHardy

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.