qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [patch] slirp bootp, Request&Discover


From: Renzo Davoli
Subject: Re: [Qemu-devel] [patch] slirp bootp, Request&Discover
Date: Thu, 13 May 2004 17:02:21 +0200
User-agent: Mutt/1.3.28i

On Wed, May 12, 2004 at 10:09:44PM +0200, Fabrice Bellard wrote:
> Strange. If a real DHCP server accepts that, then I agree to merge it. 
> Otherwise, it may be bug in the NE2000 emulation.

AFAIK it is not strange.

DHCP request is sent also for renewing a lease.
you use a very long lease time (1 day) but it seems that win 98 despite
of a boot remembers that it already had a lease and asks just for a renewal.

I have written a new patch that not only solves this problem but it
gives also a better approximation of the DHCP protocol by managing 
a simplified version of the lease protocol.

It is useful for using qemu with user-net for a period of time longer than the 
lease expire time (or to connect several interfaces-machines to the dhcp
server).

This patch:
- tries to reaasign the previous address to each MAC address.
- if there are no more available addresses re-assigns IP with expired
  leases.
- If somebody tries to DISCOVER multiple times sends back the same
  address (Win 98 ask several times when the address has changed)
- When REQUEST asks for an already assigned address returns DHCPNAK
  (unfortunately Win 98 does not manage this correctly).
  When 98 has a valid lease from a previous session it asks twice for
  the previous address and regardless of the NAK coming from the server it tests
  with a ping whether the address is available or not and *keeps it*!
  IMHO this is plain against the RFC 2131.

Fabrice,
I am including this into slirpvde, maybe my previous fix is enough for
dhcp inside qemu (as it has a single guest machine) but if you like we
can keep the source code aligned.

ciao
        renzo

Attachment: bootp.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]