Subject: Re: bin/10076: 16MB limit in tftp / tftpd
To: None <>
From: Geoff Wing <>
List: netbsd-bugs
Date: 05/09/2000 00:16:10
Reinoud Zandijk <> typed:
:Every tftp request made for a file bigger than 16Mb, the transfer stops
:when the 16Mb is reached ... this is due to the block counter.
:This counter is a signed short in the protocol, and so the maximum number

The protocol specifies ``2 bytes'' using ``8 bit bytes''.

:of blocks is 16Mb/512 bytes =  32768 and will then wrap to a
:negative number. Since the tftpd deamon and the tftp client also keep a
:counter for block numbering and is declared as an `int',
:this counter won't wrap and thus breaking the protocol, for it can't
:resynchronise anymore

:Patching the following files by changing the type of the `block' counter
:from `int' to `signed short' :

It would probably disambiguate more if you used   int16_t  (even though
int16_t == short at the moment on all our platforms)

Geoff Wing : <>     Work URL:
Rxvt Stuff : <>      Ego URL :
Zsh Stuff  : <>       Phone   : (Australia) 0413 431 874