aboutsummaryrefslogtreecommitdiff
path: root/slirp/slirp.c
diff options
context:
space:
mode:
Diffstat (limited to 'slirp/slirp.c')
-rw-r--r--slirp/slirp.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/slirp/slirp.c b/slirp/slirp.c
index b3db74223a..b0a092c14c 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -171,7 +171,8 @@ static void slirp_cleanup(void)
static void slirp_state_save(QEMUFile *f, void *opaque);
static int slirp_state_load(QEMUFile *f, void *opaque, int version_id);
-void slirp_init(int restricted, const char *special_ip)
+void slirp_init(int restricted, const char *special_ip, const char *tftp_path,
+ const char *bootfile)
{
// debug_init("/tmp/slirp.log", DEBUG_DEFAULT);
@@ -203,6 +204,17 @@ void slirp_init(int restricted, const char *special_ip)
if (special_ip)
slirp_special_ip = special_ip;
+ qemu_free(tftp_prefix);
+ tftp_prefix = NULL;
+ if (tftp_path) {
+ tftp_prefix = qemu_strdup(tftp_path);
+ }
+ qemu_free(bootp_filename);
+ bootp_filename = NULL;
+ if (bootfile) {
+ bootp_filename = qemu_strdup(bootfile);
+ }
+
inet_aton(slirp_special_ip, &special_addr);
alias_addr.s_addr = special_addr.s_addr | htonl(CTL_ALIAS);
getouraddr();