mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
slirp: Add domainname option to slirp's DHCP server
This patch will allow the user to include the domainname option in replies from the built-in DHCP server. Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
parent
c181ddaa17
commit
f18d137542
7 changed files with 31 additions and 7 deletions
|
@ -298,6 +298,14 @@ static void bootp_reply(Slirp *slirp, const struct bootp_t *bp)
|
|||
q += val;
|
||||
}
|
||||
|
||||
if (slirp->vdomainname) {
|
||||
val = strlen(slirp->vdomainname);
|
||||
*q++ = RFC1533_DOMAINNAME;
|
||||
*q++ = val;
|
||||
memcpy(q, slirp->vdomainname, val);
|
||||
q += val;
|
||||
}
|
||||
|
||||
if (slirp->vdnssearch) {
|
||||
size_t spaceleft = sizeof(rbp->bp_vend) - (q - rbp->bp_vend);
|
||||
val = slirp->vdnssearch_len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue