FTP sequence tracking cleanups
Subsystems (2)
PATCH 1/1 FTP sequence tracking cleanups
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
net/ipv4/netfilter/ip_conntrack_ftp.c +6 -6
@@ -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 */
Quoted 2 lines · Phil Oester
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