pypxe / PyPXE

Pure Python PXE (DHCP-(Proxy)/TFTP/HTTP/NBD) Server
MIT License
547 stars 125 forks source link

TFTP Sequence Wraps Not Working #94

Closed icb- closed 9 years ago

icb- commented 9 years ago

TFTP sequence wraps aren't working. After we hit block 65535, we wrap around to sequence number 0 again, and start logging "Ignoring duplicated ACK received for block 65535" until the client gives up. See https://www.cloudshark.org/captures/07ebe14c792b for a packet capture. I've trimmed the packets between 414 and 415.

Fixing this may be as simple as taking the sequence numbers modulo 65536 when checking if we have a duplicate (or out of sequence) ack.

psychomario commented 9 years ago

The proposed fix seems sensible, the relevant sections being in Client.handle()

mmattioli commented 9 years ago

@icb- if you want to make a branch based off of development and submit a PR to development once you have a fix that'd be awesome. Thanks!