diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_conntrack_ftp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c index a186799f6542..4bb669c7780f 100644 --- a/net/netfilter/nf_conntrack_ftp.c +++ b/net/netfilter/nf_conntrack_ftp.c | |||
@@ -335,15 +335,17 @@ static void update_nl_seq(u32 nl_seq, struct nf_ct_ftp_master *info, int dir, | |||
335 | if (info->seq_aft_nl[dir][i] == nl_seq) | 335 | if (info->seq_aft_nl[dir][i] == nl_seq) |
336 | return; | 336 | return; |
337 | 337 | ||
338 | if (oldest == info->seq_aft_nl_num[dir] | 338 | if (oldest == info->seq_aft_nl_num[dir] || |
339 | || before(info->seq_aft_nl[dir][i], oldest)) | 339 | before(info->seq_aft_nl[dir][i], |
340 | info->seq_aft_nl[dir][oldest])) | ||
340 | oldest = i; | 341 | oldest = i; |
341 | } | 342 | } |
342 | 343 | ||
343 | if (info->seq_aft_nl_num[dir] < NUM_SEQ_TO_REMEMBER) { | 344 | if (info->seq_aft_nl_num[dir] < NUM_SEQ_TO_REMEMBER) { |
344 | info->seq_aft_nl[dir][info->seq_aft_nl_num[dir]++] = nl_seq; | 345 | info->seq_aft_nl[dir][info->seq_aft_nl_num[dir]++] = nl_seq; |
345 | nf_conntrack_event_cache(IPCT_HELPINFO_VOLATILE, skb); | 346 | nf_conntrack_event_cache(IPCT_HELPINFO_VOLATILE, skb); |
346 | } else if (oldest != NUM_SEQ_TO_REMEMBER) { | 347 | } else if (oldest != NUM_SEQ_TO_REMEMBER && |
348 | after(nl_seq, info->seq_aft_nl[dir][oldest])) { | ||
347 | info->seq_aft_nl[dir][oldest] = nl_seq; | 349 | info->seq_aft_nl[dir][oldest] = nl_seq; |
348 | nf_conntrack_event_cache(IPCT_HELPINFO_VOLATILE, skb); | 350 | nf_conntrack_event_cache(IPCT_HELPINFO_VOLATILE, skb); |
349 | } | 351 | } |