SACK broken in HEAD/RELENG_7

From: James Healy <jhealy_at_swin.edu.au>
Date: Mon, 26 Nov 2007 13:08:58 +1100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

While monitoring a data transfer between two 7-beta3 hosts with tcpdump
and SIFTR[1] last week, we noticed that SACK was not being negotiated as
expected.

The SACK option was sent in the SYN, but the option wasn't sent back in
the SYNACK, despite SACK being enabled on both hosts.

The problem seems to have been caused during some refactoring of
tcp_syncache.c back in march (r1.105), and is fixed by the single line
patch attached.

While investigating the issue, the comments relating to TOF_SACKPERM and
TOF_SACK in tcp_var.h made it a little harder to understand what was
going on. We interpreted the comment for TOF_SACK to imply that it was
used during the handshake. The attached patch only fixes the code, but
it might be worth tweaking these comments as well. Maybe something like:

#define TOF_SACKPERM  0x0004 /* SACK permitted */
#define TOF_SACK  0x0080     /* SACK hole data */

In our opinion, it might also be worth renaming SCF_SACK to SCF_SACKPERM
in tcp_syncache.c to semantically align it with the TOF defines in
tcp_var.h.

James Healy and Lawrence Stewart

http://caia.swin.edu.au

[1] http://caia.swin.edu.au/urp/newtcp/tools.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHSiq64oawkrbYo/kRAsX0AKCybMhaBxPaYtmKNrYF0+kkh4s/DgCfQK0W
+79c+IH5nzG3r+6Nn/ji8L4=
=TD4L
-----END PGP SIGNATURE-----

Swinburne University of Technology
CRICOS Provider Code: 00111D

NOTICE
This e-mail and any attachments are confidential and intended only for the use of the addressee. They may contain information that is privileged or protected by copyright. If you are not the intended recipient, any dissemination, distribution, printing, copying or use is strictly prohibited. The University does not warrant that this e-mail and any attachments are secure and there is also a risk that it may be corrupted in transmission. It is your responsibility to check any attachments for viruses or defects before opening them. If you have received this transmission in error, please contact us on +61 3 9214 8000 and delete it immediately from your system. We do not accept liability in connection with computer virus, data corruption, delay, interruption, unauthorised access or unauthorised amendment.

Please consider the environment before printing this email.

Received on Mon Nov 26 2007 - 01:29:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:23 UTC