From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BYI0s-0002oe-5H for qemu-devel@nongnu.org; Thu, 10 Jun 2004 01:22:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BYI0r-0002oL-DA for qemu-devel@nongnu.org; Thu, 10 Jun 2004 01:22:05 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BYI0r-0002oI-Ak for qemu-devel@nongnu.org; Thu, 10 Jun 2004 01:22:05 -0400 Received: from [81.228.9.109] (helo=av3-1-sn3.vrr.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BYHzn-0002Cw-K7 for qemu-devel@nongnu.org; Thu, 10 Jun 2004 01:20:59 -0400 Received: from smtp1-2-sn3.vrr.skanova.net (smtp1-2-sn3.vrr.skanova.net [81.228.9.178]) by av3-1-sn3.vrr.skanova.net (Postfix) with ESMTP id 278F937E88 for ; Thu, 10 Jun 2004 07:20:58 +0200 (CEST) Received: from putte2k (h151n2fls306o994.telia.com [81.225.243.151]) by smtp1-2-sn3.vrr.skanova.net (Postfix) with SMTP id 0BE0B38005 for ; Thu, 10 Jun 2004 07:20:57 +0200 (CEST) Message-ID: <000b01c44eaa$bf37f9a0$0401a8c0@putte2k> From: "Mike Nordell" Date: Thu, 10 Jun 2004 07:21:11 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: NE2000 problem found Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org I wrote: > It's also the thing that it seems only about every second time > networking "works", to the extent the guest actually gets a > DHCP address. I have now identified, and "fixed" this problem it seems. I have rebooted four times, and the guest has gotten an IP every time. It was that Windows cached the previous IP and tried to get that again on next reboot, using DHCPREQUEST. Unfortunately, that failed miserably with the CVS QEMU/slirp DHCP server. Basically, the code just dropped the request and therefore the guest never got an IP. When Windows didn't get an IP, it noted so, and on the next reboot used DHCPDISCOVER - which works - and so the merro-go-around starts over again on next reboot. :-) I "fixed" it in a really Q&D way (probably wrong, and please don't hold the "goto" against me - I just wanted to display with as little code as possible how it could be fixed) bootp_reply, in bootp.c +try_again: if (dhcp_msg_type == DHCPDISCOVER) { ... } else { bc = find_addr(&daddr.sin_addr, bp->bp_hwaddr); if (!bc) { dprintf("no address assigned\n"); +#if 1 + dhcp_msg_type = DHCPDISCOVER; + goto try_again; +#else return; +#endif } /Mike