Commit d026fb6dab9483869897d9d762311db8895ecca5
Committed by
Anthony Liguori
1 parent
1c27a8b3
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>
Showing
1 changed file
with
1 additions
and
1 deletions
net.c
| ... | ... | @@ -1416,7 +1416,7 @@ static void tap_set_sndbuf(TAPState *s, const char *sndbuf_str, Monitor *mon) |
| 1416 | 1416 | sndbuf = INT_MAX; |
| 1417 | 1417 | } |
| 1418 | 1418 | |
| 1419 | - if (ioctl(s->fd, TUNSETSNDBUF, &sndbuf) == -1) { | |
| 1419 | + if (ioctl(s->fd, TUNSETSNDBUF, &sndbuf) == -1 && sndbuf_str) { | |
| 1420 | 1420 | config_error(mon, "TUNSETSNDBUF ioctl failed: %s\n", |
| 1421 | 1421 | strerror(errno)); |
| 1422 | 1422 | } | ... | ... |