aboutsummaryrefslogtreecommitdiff
path: root/slirp/bootp.c
diff options
context:
space:
mode:
Diffstat (limited to 'slirp/bootp.c')
-rw-r--r--slirp/bootp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/slirp/bootp.c b/slirp/bootp.c
index 9f0652fd63..62cbcfd8f3 100644
--- a/slirp/bootp.c
+++ b/slirp/bootp.c
@@ -228,6 +228,14 @@ static void bootp_reply(struct bootp_t *bp)
val = htonl(LEASE_TIME);
memcpy(q, &val, 4);
q += 4;
+
+ if (*slirp_hostname) {
+ val = strlen(slirp_hostname);
+ *q++ = RFC1533_HOSTNAME;
+ *q++ = val;
+ memcpy(q, slirp_hostname, val);
+ q += val;
+ }
}
*q++ = RFC1533_END;