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:
parent
1c27a8b35e
commit
d026fb6dab
2
net.c
2
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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user