From patchwork Wed Jun 8 08:24:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3/6] slirp: fix guestfwd id Date: Tue, 07 Jun 2011 22:24:45 -0000 From: Stefan Hajnoczi X-Patchwork-Id: 99380 Message-Id: <1307521488-6066-4-git-send-email-stefanha@linux.vnet.ibm.com> To: Cc: Alexander Graf , Stefan Hajnoczi From: Alexander Graf When using -net user,guestfwd=... Qemu immediately complains about the id being in invalid format. This is because we pass in an id that contains a colon, while the id restrictions don't allow colons. This patch changes the colon into a dot, making guestfwd work again. Signed-off-by: Alexander Graf Signed-off-by: Stefan Hajnoczi --- net/slirp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/slirp.c b/net/slirp.c index e387a11..e057a14 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -614,7 +614,7 @@ static int slirp_guestfwd(SlirpState *s, const char *config_str, } fwd = qemu_malloc(sizeof(struct GuestFwd)); - snprintf(buf, sizeof(buf), "guestfwd.tcp:%d", port); + snprintf(buf, sizeof(buf), "guestfwd.tcp.%d", port); fwd->hd = qemu_chr_open(buf, p, NULL); if (!fwd->hd) { error_report("could not open guest forwarding device '%s'", buf);