From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from tango.tkos.co.il ([62.219.50.35]) by bombadil.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1OSkFL-0007YQ-Pe for barebox@lists.infradead.org; Sun, 27 Jun 2010 05:17:36 +0000 From: Baruch Siach Date: Sun, 27 Jun 2010 08:17:16 +0300 Message-Id: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH net-pu] tftp: fix push for servers supporting 'option acknowledgement' To: Sascha Hauer Cc: barebox@lists.infradead.org When doing push receiving 'option acknowledgement' should move the protocol to state WDATA, and set block number to 1. Signed-off-by: Baruch Siach --- net/tftp.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/net/tftp.c b/net/tftp.c index 14d9b5e..20fab78 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -186,6 +186,10 @@ static void tftp_handler(char *packet, unsigned len) case TFTP_OACK: debug("Got OACK: %s %s\n", pkt, pkt + strlen(pkt) + 1); tftp_state = STATE_OACK; + if (tftp_put) { + tftp_block = 1; + tftp_state = STATE_WDATA; + } tftp_server_port = ntohs(udp->uh_sport); tftp_con->udp->uh_dport = udp->uh_sport; tftp_send(); /* Send ACK */ -- 1.7.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox