aboutsummaryrefslogtreecommitdiff
path: root/slirp/bootp.h
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-21 19:56:20 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-21 19:56:20 +0000
commitb63c7f6b77145c109d66a62bb3b6efe12b80d62b (patch)
tree2d1ca4c951170294136289246e595c84e3f810b8 /slirp/bootp.h
parent8e4416af458b5fdfc81950005e358de02511eb9f (diff)
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
Diffstat (limited to 'slirp/bootp.h')
-rw-r--r--slirp/bootp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/slirp/bootp.h b/slirp/bootp.h
index e48f53f37a..3d80515c98 100644
--- a/slirp/bootp.h
+++ b/slirp/bootp.h
@@ -63,6 +63,7 @@
#define RFC2132_MSG_TYPE 53
#define RFC2132_SRV_ID 54
#define RFC2132_PARAM_LIST 55
+#define RFC2132_MESSAGE 56
#define RFC2132_MAX_SIZE 57
#define RFC2132_RENEWAL_TIME 58
#define RFC2132_REBIND_TIME 59
@@ -71,6 +72,7 @@
#define DHCPOFFER 2
#define DHCPREQUEST 3
#define DHCPACK 5
+#define DHCPNAK 6
#define RFC1533_VENDOR_MAJOR 0
#define RFC1533_VENDOR_MINOR 0