summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2011-06-04 07:25:59 +0200
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2011-06-08 09:04:29 +0100
commita9899996c8bc8eb7686f64207ef2ce1137dd125b (patch)
tree145959ae0776e38a8bc3c668a1682df7ad914d5b /net
parent9bf0960a9adb93c38b879a2114f6c67e30427307 (diff)
slirp: fix guestfwd id
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 <agraf@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'net')
-rw-r--r--net/slirp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/slirp.c b/net/slirp.c
index e387a116a..e057a14ce 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);