Skip to contentSkip to conversation

: Fix truncated sequence numbers in FTP helper

PATCH New Patrick McHardy 1 participant 1 message Apr 18, 2005 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 : Fix truncated sequence numbers in FTP helper

Hi Dave,

these two fixes fix one rather serious and one annoying problem and should go in 2.6.12.

This first patch fixes truncated sequence numbers in ip_conntrack_ftp, the types were changed to u16 by some unfortunate patch.

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2005/03/09 22:51:34+01:00 [email protected]
# [NETFILTER]: Fix truncated sequence numbers in FTP helper
#
# Signed-off-by: Yasuyuki KOZAKAI <[email protected]>
# Signed-off-by: Patrick McHardy <[email protected]>
#

# net/ipv4/netfilter/ip_conntrack_ftp.c
#   2005/03/09 22:51:26+01:00 [email protected] +2 -2
#   [NETFILTER]: Fix truncated sequence numbers in FTP helper
#   
#   Signed-off-by: Yasuyuki KOZAKAI <[email protected]>
#   Signed-off-by: Patrick McHardy <[email protected]>
# 
diff -Nru a/net/ipv4/netfilter/ip_conntrack_ftp.c b/net/ipv4/netfilter/ip_conntrack_ftp.c
--- a/net/ipv4/netfilter/ip_conntrack_ftp.c	2005-04-18 03:59:47 +02:00
+++ b/net/ipv4/netfilter/ip_conntrack_ftp.c	2005-04-18 03:59:47 +02:00
@@ -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;