From patchwork Sat Jun 4 05:25:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 98755 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 55CB3B6F9F for ; Sun, 5 Jun 2011 20:27:39 +1000 (EST) Received: from localhost ([::1]:46934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTAYR-0004wk-DP for incoming@patchwork.ozlabs.org; Sun, 05 Jun 2011 06:27:35 -0400 Received: from eggs.gnu.org ([140.186.70.92]:36304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTAUk-0004k7-Uh for qemu-devel@nongnu.org; Sun, 05 Jun 2011 06:23:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTAUj-0001Mm-5x for qemu-devel@nongnu.org; Sun, 05 Jun 2011 06:23:46 -0400 Received: from cantor2.suse.de ([195.135.220.15]:59509 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTAUi-0001MY-R2; Sun, 05 Jun 2011 06:23:44 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id D42C9867E2; Sun, 5 Jun 2011 12:23:43 +0200 (CEST) From: Alexander Graf To: "qemu-devel@nongnu.org Developers" Date: Sat, 4 Jun 2011 07:25:59 +0200 Message-Id: <1307165159-29222-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: qemu-trivial@nongnu.org Subject: [Qemu-devel] [PATCH] slirp: fix guestfwd id X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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);