aboutsummaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'net.c')
-rw-r--r--net.c2
1 files changed, 1 insertions, 1 deletions
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));
}