aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-10-27 22:04:58 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2016-11-02 09:28:56 +0100
commitd14fabd9c2debef0d51ec90af1326e83111a77de (patch)
treec49ced8e8469ef28dc25daf1524da2f0afb3a587
parentfffbd9cf1befa256d75bc45541adca405bb65dd5 (diff)
slirp: fix CharDriver breakage
SLIRP expects a CharBackend as the third argument to slirp_add_exec, but net/slirp.c was passing a CharDriverState. Fix this to restore guestfwd functionality. Reported-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--net/slirp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/slirp.c b/net/slirp.c
index 64dd3255ae..bcd1c5f57d 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -763,8 +763,7 @@ static int slirp_guestfwd(SlirpState *s, const char *config_str,
return -1;
}
- if (slirp_add_exec(s->slirp, 3, qemu_chr_fe_get_driver(&fwd->hd),
- &server, port) < 0) {
+ if (slirp_add_exec(s->slirp, 3, &fwd->hd, &server, port) < 0) {
error_report("conflicting/invalid host:port in guest forwarding "
"rule '%s'", config_str);
g_free(fwd);