[bittorrent] Protocol Deviation in Mainline

Elliott Mitchell ehem at m5p.com
Thu Mar 2 00:13:48 EST 2006


The official specification continues to state:

	"'request' messages contain an index, begin, and length. The last
	two are byte offsets. Length is generally a power of two unless
	it gets truncated by the end of the file. All current
	implementations use 2^15, and close connections which request an
	amount greater than 2^17."

Sometime between 3.4 and 3.9 the mainline changed so that it would
request 2^14 (16KB) and drop peers which requested more.

This isn't the area I'd been looking at so I hadn't noticed until now
(the pending fight on wiki.theory.org caused me to double-check). I'm
surprised that no one has mentioned this on any of the lists. I'd guess
either few folks use the mainline and therefor few are effected, most
clients already used 16KB and therefore weren't effected, or everyone has
been looking at the mainline code and copying that rather than the
protocol specification.

Where is the bug? Did one creep into the mainline? Certainly changing
default request size shouldn't really effect performance, so that isn't
a huge problems. At the same time this does break backwards compatibility
with older clients that have novice operators (who don't know which
setting to adjust).


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         EHeM at gremlin.m5p.com PGP 8881EF59         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
    \___\_|_/82 04 A1 3C C7 B1 37 2A*E3 6E 84 DA 97 4C 40 E6\_|_/___/





More information about the BitTorrent mailing list