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 <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Mark McLoughlin 2009-07-01 16:45:30 +01:00 committed by Anthony Liguori
parent 1c27a8b35e
commit d026fb6dab

2
net.c
View File

@ -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));
}