From: John Coiner <jcoiner@stanfordalumni.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [patch] robust user-mode DHCP
Date: Sun, 16 Oct 2005 22:02:18 -0400 [thread overview]
Message-ID: <4353062A.1060106@stanfordalumni.org> (raw)
In-Reply-To: <1129175662.13382.111.camel@aragorn>
John R. Hogerhuis wrote:
> I have no idea what 'frozen state' means in this context. Do you?
>
> I guess not, since I suppose as soon as you really knew you would be in
> a position to kill the fly with a fly swatter rather than running over
> it with your car :-).
>
> Not a criticism just a nudge... this sounds like a tiny bug somewhere
> that deserves squashing rather than hiding.
Tell me about it :)
It was a tiny bug...
Windows does not like QEMU's DHCP server. Windows always issues
DHCPDISCOVER and DHCPREQUEST packets in pairs: first the DHCPDISCOVER,
followed by a DHCPREQUEST. The DHCPREQUEST is a sanity check. Windows
wants the DHCP server to reply with the same IP for both requests,
otherwise it does not consider the DHCP operation successful.
QEMU's DHCP server will reply with a new IP for each DHCPDISCOVER.
However, for a DHCPREQUEST, it replies with the first IP it ever gave
out on the first DHCPDISCOVER.
As a consequence, Windows' first DHCPDISCOVER/DHCPREQUEST pair succeeds,
and every subsequent pair fails. That is why disabling and reenabling
the NIC does not work, and why using the "ipconfig" program to renew the
DHCP also does not work.
Here's a patch to fix this:
http://people.brandeis.edu/~jcoiner/qemu_idedma/qemu_dma_patch.html#dhcp
This patch also forces QEMU to reread the host's DNS info on any guest
DHCP request, this is useful for users whose host DNS changes often.
> What happens in the normal case to the software stack when a network
> card is reset? Would all TCP connections that hadn't timed out yet time
> out? That is, would the set of allocated sockets be freed back to the
> pool? Slirp maintains context about every connection passing through it
> since it is a proxy server. So if you reset it all those connections
> would be dropped. So even if the socket was left open on the guest, it
> would definitely be dropped in slirp.
Yeah, all the stateful connections have some kind of timeout attached,
after which they vaporize. So I'd agree that there's never a need to
throw away one copy of slirp and set up another one.
Thanks.
-- John
next prev parent reply other threads:[~2005-10-17 2:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-13 2:34 [Qemu-devel] [patch] robust user-mode networking John Coiner
2005-10-13 3:54 ` John R. Hogerhuis
2005-10-17 2:02 ` John Coiner [this message]
2005-10-17 17:58 ` [Qemu-devel] Re: [patch] robust user-mode DHCP John R. Hogerhuis
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=4353062A.1060106@stanfordalumni.org \
--to=jcoiner@stanfordalumni.org \
--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).