diff options
author | archie <archie@FreeBSD.org> | 2000-09-11 19:11:33 +0000 |
---|---|---|
committer | archie <archie@FreeBSD.org> | 2000-09-11 19:11:33 +0000 |
commit | 51e519827fd7281e350cf9a22d2294f55da50a5d (patch) | |
tree | bed18f38390a8f3d1f733eca5d2ba0af5bac9dfa | |
parent | b8784589523b53000fd8101fe8020c616ff4b9bf (diff) | |
download | FreeBSD-src-51e519827fd7281e350cf9a22d2294f55da50a5d.zip FreeBSD-src-51e519827fd7281e350cf9a22d2294f55da50a5d.tar.gz |
Don't do snd_nxt rollback optimization (rev. 1.46) for SYN packets.
It causes a panic when/if snd_una is incremented elsewhere (this
is a conservative change, because originally no rollback occurred
for any packets at all).
Submitted by: Vivek Sadananda Pai <vivek@imimic.com>
-rw-r--r-- | sys/netinet/tcp_output.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 0f889b4..ce5f13b 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -874,9 +874,8 @@ send: * No need to check for TH_FIN here because * the TF_SENTFIN flag handles that case. */ - if (flags & TH_SYN) - tp->snd_nxt--; - tp->snd_nxt -= len; + if ((flags & TH_SYN) == 0) + tp->snd_nxt -= len; } out: |