mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -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
|
@ -286,7 +286,7 @@ Slirp *slirp_init(int restricted, bool in_enabled, struct in_addr vnetwork,
|
|||
const char *tftp_path, const char *bootfile,
|
||||
struct in_addr vdhcp_start, struct in_addr vnameserver,
|
||||
struct in6_addr vnameserver6, const char **vdnssearch,
|
||||
void *opaque)
|
||||
const char *vdomainname, void *opaque)
|
||||
{
|
||||
Slirp *slirp = g_malloc0(sizeof(Slirp));
|
||||
|
||||
|
@ -317,6 +317,7 @@ Slirp *slirp_init(int restricted, bool in_enabled, struct in_addr vnetwork,
|
|||
}
|
||||
slirp->tftp_prefix = g_strdup(tftp_path);
|
||||
slirp->bootp_filename = g_strdup(bootfile);
|
||||
slirp->vdomainname = g_strdup(vdomainname);
|
||||
slirp->vdhcp_startaddr = vdhcp_start;
|
||||
slirp->vnameserver_addr = vnameserver;
|
||||
slirp->vnameserver_addr6 = vnameserver6;
|
||||
|
@ -349,6 +350,7 @@ void slirp_cleanup(Slirp *slirp)
|
|||
g_free(slirp->vdnssearch);
|
||||
g_free(slirp->tftp_prefix);
|
||||
g_free(slirp->bootp_filename);
|
||||
g_free(slirp->vdomainname);
|
||||
g_free(slirp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue