slirp: Handle DHCP requests for specific IP (Jan Kiszka)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 21 Apr 2009 19:56:20 +0000 (19:56 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Tue, 21 Apr 2009 19:56:20 +0000 (19:56 +0000)
commitb63c7f6b77145c109d66a62bb3b6efe12b80d62b
tree2d1ca4c951170294136289246e595c84e3f810b8
parent8e4416af458b5fdfc81950005e358de02511eb9f
slirp: Handle DHCP requests for specific IP (Jan Kiszka)

This adds proper handling of the ciaddr field as well as the "Requested
IP Address" option to slirp's DHCP server. If the client requests an
invalid or used IP, a NAK reply is sent, if it requests a specific but
valid IP, this is now respected.

NAK'ing invalid IPs is specifically useful when changing the slirp IP
range via '-net user,ip=...' while the client saved its previously used
address and tries to reacquire it. Now this will be NAK'ed and the
client will start a new discovery round.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7198 c046a42c-6fe2-441c-8c8c-71466251a162
slirp/bootp.c
slirp/bootp.h