+ if (ntohs(*(__be16 *)pkt) != (ushort)(tftp_cur_block + 1)) {
+ debug("Received unexpected block: %d, expected: %d\n",
+ ntohs(*(__be16 *)pkt),
+ (ushort)(tftp_cur_block + 1));
+ /*
+ * If one packet is dropped most likely
+ * all other buffers in the window
+ * that will arrive will cause a sending NACK.
+ * This just overwellms the server, let's just send one.
+ */
+ if (tftp_last_nack != tftp_cur_block) {
+ tftp_send();
+ tftp_last_nack = tftp_cur_block;
+ tftp_next_ack = (ushort)(tftp_cur_block +
+ tftp_windowsize);
+ }
+ break;
+ }
+
+ tftp_cur_block++;
+ tftp_cur_block %= TFTP_SEQUENCE_SIZE;
+
+ if (tftp_state == STATE_SEND_RRQ) {