From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MM20Y-0005gI-PX for qemu-devel@nongnu.org; Wed, 01 Jul 2009 11:46:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MM20U-0005f4-Sl for qemu-devel@nongnu.org; Wed, 01 Jul 2009 11:46:02 -0400 Received: from [199.232.76.173] (port=39338 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MM20U-0005f1-N7 for qemu-devel@nongnu.org; Wed, 01 Jul 2009 11:45:58 -0400 Received: from mx2.redhat.com ([66.187.237.31]:43982) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MM20T-0003dM-I8 for qemu-devel@nongnu.org; Wed, 01 Jul 2009 11:45:58 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n61Fjheo015091 for ; Wed, 1 Jul 2009 11:45:43 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n61FjhaC004586 for ; Wed, 1 Jul 2009 11:45:43 -0400 Received: from [IPv6:::1] (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n61FjgFE023187 for ; Wed, 1 Jul 2009 11:45:42 -0400 From: Mark McLoughlin Content-Type: text/plain Date: Wed, 01 Jul 2009 16:45:30 +0100 Message-Id: <1246463130.598.73.camel@blaa> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] Don't abort if TUNSETSNDBUF fails where no sndbuf= arg is supplied Reply-To: Mark McLoughlin List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel If no tap,sndbuf= arg is supplied, we use a default value. If TUNSETSNDBUF fails in this case, we should not abort. Signed-off-by: Mark McLoughlin --- net.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net.c b/net.c index 21842d0..770162f 100644 --- a/net.c +++ b/net.c @@ -1416,7 +1416,7 @@ static void tap_set_sndbuf(TAPState *s, const char *sndbuf_str, Monitor *mon) sndbuf = INT_MAX; } - if (ioctl(s->fd, TUNSETSNDBUF, &sndbuf) == -1) { + if (ioctl(s->fd, TUNSETSNDBUF, &sndbuf) == -1 && sndbuf_str) { config_error(mon, "TUNSETSNDBUF ioctl failed: %s\n", strerror(errno)); } -- 1.6.2.2