* SACK + MD5 overflows TCP options space
@ 2008-05-29 2:30 Adam Langley
0 siblings, 0 replies; only message in thread
From: Adam Langley @ 2008-05-29 2:30 UTC (permalink / raw)
To: netdev
in tcp_output.c:tcp_transmit_skb we have:
ifdef CONFIG_TCP_MD5SIG
/*
* Are we doing MD5 on this segment? If so - make
* room for it.
*/
md5 = tp->af_specific->md5_lookup(sk, sk);
if (md5)
tcp_header_size += TCPOLEN_MD5SIG_ALIGNED;
#endif
However, the SACK option can be at least 18 bytes long (I've not
checked the code here, I've just observed a packet go by with that
much SACK in it). With alignment padding, that's 20 bytes. Plus 12
bytes of timestamp option (aligned). Then, adding 18 bytes of MD5SIG
rolls the TCP header size over and we produce garbage, right?
I'm only asking because I've a patch which adds a similar option and,
when SACK kicks in, I'm getting TCP header sizes of 0 or 8 bytes. If
there's a solution to the MD5 case that I'm missing I'd love to use
it. (Otherwise, I've another bodge up my sleeves)
Cheers
--
Adam Langley agl@imperialviolet.org http://www.imperialviolet.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-05-29 2:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-29 2:30 SACK + MD5 overflows TCP options space Adam Langley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).