Commit 439714df authored by Harald Welte's avatar Harald Welte Committed by David S. Miller

[NETFILTER]: Fix NAT helper handling of TCP window tracking info.

Fix NAT helper code to update TCP window tracking information
if it resizes payload (and thus alrers sequence numbers).

This patchlet was somehow lost during 2.4.x->2.6.x port of TCP 
window tracking :(
Signed-off-by: default avatarHarald Welte <laforge@netfilter.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 68484872
......@@ -347,7 +347,7 @@ ip_nat_sack_adjust(struct sk_buff **pskb,
return 1;
}
/* TCP sequence number adjustment. Returns true or false. */
/* TCP sequence number adjustment. Returns 1 on success, 0 on failure */
int
ip_nat_seq_adjust(struct sk_buff **pskb,
struct ip_conntrack *ct,
......@@ -396,7 +396,12 @@ ip_nat_seq_adjust(struct sk_buff **pskb,
tcph->seq = newseq;
tcph->ack_seq = newack;
return ip_nat_sack_adjust(pskb, tcph, ct, ctinfo);
if (!ip_nat_sack_adjust(pskb, tcph, ct, ctinfo))
return 0;
ip_conntrack_tcp_update(*pskb, ct, dir);
return 1;
}
static inline int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment