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>
diff --git a/net.c b/net.c
index 49f4016..1507f37 100644
--- a/net.c
+++ b/net.c
@@ -1416,7 +1416,7 @@
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));
}