提交 d026fb6d 编写于 作者: M Mark McLoughlin 提交者: Anthony Liguori

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: NMark McLoughlin <markmc@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 1c27a8b3
......@@ -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));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册