rpms/kernel/devel linux-2.6-net-tcp-option-ordering.patch, NONE, 1.1 TODO, 1.28, 1.29 kernel.spec, 1.1083, 1.1084
Dave Jones
davej at fedoraproject.org
Sun Oct 26 00:04:48 UTC 2008
- Previous message: rpms/revisor/EL-5 import.log, NONE, 1.1 .cvsignore, 1.16, 1.17 revisor.spec, 1.30, 1.31 sources, 1.33, 1.34
- Next message: rpms/kdepim/F-10 kdepim.spec,1.194,1.195
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: davej
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24221
Modified Files:
TODO kernel.spec
Added Files:
linux-2.6-net-tcp-option-ordering.patch
Log Message:
tcp: Restore ordering of TCP options for the sake of inter-operability
linux-2.6-net-tcp-option-ordering.patch:
--- NEW FILE linux-2.6-net-tcp-option-ordering.patch ---
commit fd6149d332973bafa50f03ddb0ea9513e67f4517
Author: Ilpo Järvinen <ilpo.jarvinen at helsinki.fi>
Date: Thu Oct 23 14:06:35 2008 -0700
tcp: Restore ordering of TCP options for the sake of inter-operability
This is not our bug! Sadly some devices cannot cope with the change
of TCP option ordering which was a result of the recent rewrite of
the option code (not that there was some particular reason steming
from the rewrite for the reordering) though any ordering of TCP
options is perfectly legal. Thus we restore the original ordering
to allow interoperability with/through such broken devices and add
some warning about this trap. Since the reordering just happened
without any particular reason, this change shouldn't cost us
anything.
There are already couple of known failure reports (within close
proximity of the last release), so the problem might be more
wide-spread than a single device. And other reports which may
be due to the same problem though the symptoms were less obvious.
Analysis of one of the case revealed (with very high probability)
that sack capability cannot be negotiated as the first option
(SYN never got a response).
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen at helsinki.fi>
Reported-by: Aldo Maggi <sentiniate at tiscali.it>
Tested-by: Aldo Maggi <sentiniate at tiscali.it>
Signed-off-by: David S. Miller <davem at davemloft.net>
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index de54f02..e4c5ac9 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -362,6 +362,17 @@ struct tcp_out_options {
__u32 tsval, tsecr; /* need to include OPTION_TS */
};
+/* Beware: Something in the Internet is very sensitive to the ordering of
+ * TCP options, we learned this through the hard way, so be careful here.
+ * Luckily we can at least blame others for their non-compliance but from
+ * inter-operatibility perspective it seems that we're somewhat stuck with
+ * the ordering which we have been using if we want to keep working with
+ * those broken things (not that it currently hurts anybody as there isn't
+ * particular reason why the ordering would need to be changed).
+ *
+ * At least SACK_PERM as the first option is known to lead to a disaster
+ * (but it may well be that other scenarios fail similarly).
+ */
static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp,
const struct tcp_out_options *opts,
__u8 **md5_hash) {
@@ -376,6 +387,12 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp,
*md5_hash = NULL;
}
+ if (unlikely(opts->mss)) {
+ *ptr++ = htonl((TCPOPT_MSS << 24) |
+ (TCPOLEN_MSS << 16) |
+ opts->mss);
+ }
+
if (likely(OPTION_TS & opts->options)) {
if (unlikely(OPTION_SACK_ADVERTISE & opts->options)) {
*ptr++ = htonl((TCPOPT_SACK_PERM << 24) |
@@ -392,12 +409,6 @@ static void tcp_options_write(__be32 *ptr, struct tcp_sock *tp,
*ptr++ = htonl(opts->tsecr);
}
- if (unlikely(opts->mss)) {
- *ptr++ = htonl((TCPOPT_MSS << 24) |
- (TCPOLEN_MSS << 16) |
- opts->mss);
- }
-
if (unlikely(OPTION_SACK_ADVERTISE & opts->options &&
!(OPTION_TS & opts->options))) {
*ptr++ = htonl((TCPOPT_NOP << 24) |
Index: TODO
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/TODO,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- TODO 25 Oct 2008 02:55:41 -0000 1.28
+++ TODO 26 Oct 2008 00:04:17 -0000 1.29
@@ -180,3 +180,7 @@
linux-2.6-usb-storage-unusual-devs-jmicron-ata-bridge.patch
should be sent for stable
+
+linux-2.6-net-tcp-option-ordering.patch
+ Backport of fd6149d332973bafa50f03ddb0ea9513e67f4517 from .28
+
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1083
retrieving revision 1.1084
diff -u -r1.1083 -r1.1084
--- kernel.spec 25 Oct 2008 02:55:41 -0000 1.1083
+++ kernel.spec 26 Oct 2008 00:04:18 -0000 1.1084
@@ -616,6 +616,7 @@
Patch400: linux-2.6-scsi-cpqarray-set-master.patch
Patch420: linux-2.6-squashfs.patch
Patch430: linux-2.6-net-silence-noisy-printks.patch
+Patch440: linux-2.6-net-tcp-option-ordering.patch
Patch450: linux-2.6-input-kill-stupid-messages.patch
Patch451: linux-2.6-input-dell-keyboard-keyup.patch
Patch452: linux-2.6.27-hwmon-applesmc-2.6.28.patch
@@ -1174,6 +1175,8 @@
# Networking
# Disable easy to trigger printk's.
ApplyPatch linux-2.6-net-silence-noisy-printks.patch
+# Fix tcp option ordering.
+ApplyPatch linux-2.6-net-tcp-option-ordering.patch
# Misc fixes
# The input layer spews crap no-one cares about.
@@ -1857,6 +1860,9 @@
%kernel_variant_files -k vmlinux %{with_kdump} kdump
%changelog
+* Sat Oct 25 2008 Dave Jones <davej at redhat.com> 2.6.27.4-48.rc3
+- tcp: Restore ordering of TCP options for the sake of inter-operability
+
* Fri Oct 24 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.4-47.rc3
- Fix LBA48 on pata_it821x RAID volumes.
- Previous message: rpms/revisor/EL-5 import.log, NONE, 1.1 .cvsignore, 1.16, 1.17 revisor.spec, 1.30, 1.31 sources, 1.33, 1.34
- Next message: rpms/kdepim/F-10 kdepim.spec,1.194,1.195
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list