From: David Edmondson Subject: how to fix bugs in etherboot? Date: Fri, 23 Jan 2009 13:20:49 +0000 Message-ID: <20090123132049.GM1773@rf.hh.sledj.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="HlL+5n6rz5pIUxbD" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Upstream etherboot accepted a patch (attached) to fix wrapping of the TFTP block index. Without the patch we are unable to boot recent Solaris over the network in HVM guests (because our miniroot now exceeds 64k blocks). Whilst unstable has moved on to gpxe (which doesn't suffer from this problem), it would be useful to us for this to be fixed in the stable series. Any preferences on the best approach? I can submit changes which include an updated ROM image, the patch and scaffolding to apply it. Or something else. --HlL+5n6rz5pIUxbD Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001--core-Fix-wrapping-of-tftp-block-index.patch" >From df8d6537d7947cbe6fd8176b19e38fd45eef7313 Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Thu, 22 Jan 2009 12:19:21 -0500 Subject: [PATCH] [core] Fix wrapping of tftp block index Handle wrapping of the tftp block index correctly by ensuring that we compare unsigned shorts when examining block index numbers. Signed-off-by: Marty Connor --- src/core/nic.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/core/nic.c b/src/core/nic.c index 6aaa8e2..90dec41 100644 --- a/src/core/nic.c +++ b/src/core/nic.c @@ -828,7 +828,7 @@ int tftp_block ( struct tftpreq_info_t *request, struct tftpblk_info_t *block ) } } break; case TFTP_DATA : - if ( ntohs(rcvd->u.data.block) != ( blockidx + 1 ) ) + if ( ntohs(rcvd->u.data.block) != (unsigned short)( blockidx + 1 ) ) break; /* Re-ACK last block sent */ if ( recvlen > ( blksize+sizeof(rcvd->u.data.block) ) ) break; /* Too large; ignore */ -- 1.5.6.3 --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --HlL+5n6rz5pIUxbD--