summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorzml <zml@FreeBSD.org>2009-05-27 17:02:10 +0000
committerzml <zml@FreeBSD.org>2009-05-27 17:02:10 +0000
commit8adb24b1afca95806f41c172c2ebe8af16123122 (patch)
tree488c3ea0a193daecc6bddc2d4c0fa1b164a5372f /sys/netinet
parentb186e91180da0abaa602da3390c0d96d447be697 (diff)
downloadFreeBSD-src-8adb24b1afca95806f41c172c2ebe8af16123122.zip
FreeBSD-src-8adb24b1afca95806f41c172c2ebe8af16123122.tar.gz
Correct handling of SYN packets that are to the left of the current window of an ESTABLISHED connection.
Reviewed by: net@, gnn Approved by: dfr (mentor)
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/tcp_input.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index d4a9f70..bbf5d8f 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1818,7 +1818,11 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
todrop = tp->rcv_nxt - th->th_seq;
if (todrop > 0) {
- if (thflags & TH_SYN) {
+ /*
+ * If this is a duplicate SYN for our current connection,
+ * advance over it and pretend and it's not a SYN.
+ */
+ if (thflags & TH_SYN && th->th_seq == tp->irs) {
thflags &= ~TH_SYN;
th->th_seq++;
if (th->th_urp > 1)
OpenPOWER on IntegriCloud