From: Mark McLoughlin Date: Wed, 1 Jul 2009 15:45:30 +0000 (+0100) Subject: Don't abort if TUNSETSNDBUF fails where no sndbuf= arg is supplied X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d026fb6dab9483869897d9d762311db8895ecca5;p=qemu.git Don't abort if TUNSETSNDBUF fails where no sndbuf= arg is supplied 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 Signed-off-by: Anthony Liguori --- diff --git a/net.c b/net.c index 49f4016cf8..1507f3769a 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)); }