qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Leigh Dyer <leigh@eclinic.com.au>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: NE2000 problem found
Date: Thu, 17 Jun 2004 14:50:10 +1000	[thread overview]
Message-ID: <1087447810.14396.6.camel@shawn.local> (raw)
In-Reply-To: <000b01c44eaa$bf37f9a0$0401a8c0@putte2k>

On Thu, 2004-06-10 at 07:21 +0200, Mike Nordell wrote:
> 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.
> 

I hadn't seen any more news on this, and I didn't see any patches
committed to CVS to fix this, so I thought I'd mention that I too see
this problem with Windows 2000 (it only gets an IP address from the DHCP
server on every second boot), and that this fix seems to solve the
problem for me as well.

Thanks
Leigh

> 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
> 
> 
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel

  reply	other threads:[~2004-06-17  4:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-10  5:21 [Qemu-devel] Re: NE2000 problem found Mike Nordell
2004-06-17  4:50 ` Leigh Dyer [this message]
2004-06-26  5:06   ` kazu
  -- strict thread matches above, loose matches on Subject: below --
2004-06-10  2:43 Mike Nordell
2004-06-09 21:58 Mike Nordell
2004-06-09 23:17 ` Fabrice Bellard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1087447810.14396.6.camel@shawn.local \
    --to=leigh@eclinic.com.au \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).