summaryrefslogtreecommitdiff
path: root/slirp
diff options
context:
space:
mode:
Diffstat (limited to 'slirp')
-rw-r--r--slirp/bootp.c8
-rw-r--r--slirp/libslirp.h1
-rw-r--r--slirp/slirp.c2
3 files changed, 11 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;
diff --git a/slirp/libslirp.h b/slirp/libslirp.h
index cff159e791..36c8ec21fd 100644
--- a/slirp/libslirp.h
+++ b/slirp/libslirp.h
@@ -32,6 +32,7 @@ int slirp_add_exec(int do_pty, const char *args, int addr_low_byte,
int guest_port);
extern const char *tftp_prefix;
+extern const char slirp_hostname[33];
#ifdef __cplusplus
}
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 404cce8f76..28b8c887a4 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -25,6 +25,8 @@ struct ex_list *exec_list;
/* XXX: suppress those select globals */
fd_set *global_readfds, *global_writefds, *global_xfds;
+const char slirp_hostname[33];
+
#ifdef _WIN32
static int get_dns_addr(struct in_addr *pdns_addr)