Skip to contentSkip to conversation

slirp: fix guestfwd id

PATCH Applied Alexander Graf 2 participants 2 messages Jun 5, 2011 – Jun 7, 2011 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 net/slirp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/slirp.c +1 -1
index e387a11..e057a14 100644
@@ -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);
Signature · 1 line
1.6.0.2
#1 lore raw
Quoted 10 lines · 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.

---
 net/slirp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Thanks, applied to the trivial patches tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches

Stefan